diff --git a/src/Compute/Compute.Autorest/Az.Compute.format.ps1xml b/src/Compute/Compute.Autorest/Az.Compute.format.ps1xml index 10e2075df83d..0b968171ba75 100644 --- a/src/Compute/Compute.Autorest/Az.Compute.format.ps1xml +++ b/src/Compute/Compute.Autorest/Az.Compute.format.ps1xml @@ -96,67 +96,51 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiError + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.CommunityGalleryInfo - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiError + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.CommunityGalleryInfo - + - + - + - - - - - - Code - - - Message - - - Target - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiErrorBase - - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiErrorBase - - - - + - + - + - Code + CommunityGalleryEnabled - Message + Eula - Target + PublicName + + + PublicNamePrefix + + + PublisherContact + + + PublisherUri @@ -164,9 +148,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DataDiskImageEncryption + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DataDiskImageEncryption - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DataDiskImageEncryption + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DataDiskImageEncryption @@ -192,9 +176,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Disallowed + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Disallowed - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Disallowed + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Disallowed @@ -214,9 +198,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DiskImageEncryption + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DiskImageEncryption - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DiskImageEncryption + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DiskImageEncryption @@ -236,9 +220,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Gallery + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Gallery - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Gallery + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Gallery @@ -264,9 +248,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplication + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplication - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplication + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplication @@ -292,9 +276,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationList + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationList - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationList + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationList @@ -314,9 +298,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationProperties + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationProperties - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationProperties + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationProperties @@ -366,9 +350,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationUpdate + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationUpdate - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationUpdate + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationUpdate @@ -388,9 +372,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersion + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersion - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersion + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersion @@ -416,9 +400,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionList + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionList - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionList + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionList @@ -438,9 +422,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionProperties + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionProperties - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionProperties + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionProperties @@ -460,9 +444,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionPublishingProfile + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfile - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionPublishingProfile + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfile @@ -518,9 +502,31 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionUpdate + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfileAdvancedSettings + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfileAdvancedSettings + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionUpdate - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionUpdate + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionUpdate @@ -540,9 +546,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactPublishingProfileBase + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactPublishingProfileBase - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactPublishingProfileBase + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactPublishingProfileBase @@ -592,9 +598,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSource + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSource - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSource + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSource @@ -614,9 +620,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDataDiskImage + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDataDiskImage - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDataDiskImage + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDataDiskImage @@ -660,9 +666,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDiskImage + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDiskImage - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDiskImage + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDiskImage @@ -688,9 +694,31 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryIdentifier + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryExtendedLocation - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryIdentifier + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryExtendedLocation + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryIdentifier + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryIdentifier @@ -710,9 +738,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImage + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImage - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImage + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImage @@ -738,9 +766,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageFeature + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageFeature - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageFeature + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageFeature @@ -766,9 +794,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageIdentifier + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageIdentifier - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageIdentifier + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageIdentifier @@ -800,9 +828,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageList + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageList - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageList + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageList @@ -822,12 +850,15 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageProperties + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageProperties - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageProperties + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageProperties + + + @@ -859,6 +890,9 @@ + + Architecture + Description @@ -892,9 +926,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageUpdate + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageUpdate - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageUpdate + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageUpdate @@ -914,9 +948,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersion + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersion - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersion + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersion @@ -942,9 +976,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionList + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionList - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionList + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionList @@ -964,9 +998,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionProperties + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionProperties - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionProperties + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionProperties @@ -986,9 +1020,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionPublishingProfile + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionPublishingProfile - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionPublishingProfile + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionPublishingProfile @@ -1038,9 +1072,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionUpdate + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionUpdate - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionUpdate + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionUpdate @@ -1060,9 +1094,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryList + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryList - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryList + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryList @@ -1082,9 +1116,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryOSDiskImage + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryOSDiskImage - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryOSDiskImage + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryOSDiskImage @@ -1122,9 +1156,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryProperties + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryProperties - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryProperties + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryProperties @@ -1150,43 +1184,49 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryUpdate + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocation - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryUpdate + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocation + + + + + + + + ExtendedLocationReplicaCount + Name + + StorageAccountType + - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ImagePurchasePlan + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryUpdate - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ImagePurchasePlan + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryUpdate - - - - - - @@ -1194,39 +1234,39 @@ Name - - Product - - - Publisher - - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InnerError + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ImagePurchasePlan - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InnerError + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ImagePurchasePlan - + - + + + + - Errordetail + Name - Exceptiontype + Product + + + Publisher @@ -1234,45 +1274,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatus + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageEncryption - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatus + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageEncryption - - - - - - - - - - - - - + - Code - - - DisplayStatus - - - Level - - - Message - - - Time + DiskEncryptionSetId @@ -1280,21 +1296,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.OSDiskImageEncryption + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageSecurityProfile - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.OSDiskImageEncryption + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageSecurityProfile - + + + + - DiskEncryptionSetId + ConfidentialVMEncryptionType + + + SecureVMDiskEncryptionSetId @@ -1302,9 +1324,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RegionalReplicationStatus + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalReplicationStatus - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RegionalReplicationStatus + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalReplicationStatus @@ -1342,21 +1364,33 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatus + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalSharingStatus - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatus + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalSharingStatus - + + + + + + + - AggregatedState + Detail + + + Region + + + State @@ -1364,27 +1398,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Resource + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatus - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Resource + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatus - - - - + - Location - - - Name + AggregatedState @@ -1392,9 +1420,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRange + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRange - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRange + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRange @@ -1420,21 +1448,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTags + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfile - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTags + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfile - + - Item + Permission @@ -1442,45 +1470,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandDocument + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingStatus - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandDocument + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingStatus - - - - - - - - - - - - - + - Description - - - Label - - - OSType - - - Schema - - - Script + AggregatedState @@ -1488,39 +1492,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandDocumentBase + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingUpdate - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandDocumentBase + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingUpdate - - - - - - - - - - + - Description - - - Label - - - OSType - - - Schema + OperationType @@ -1528,27 +1514,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInput + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SoftDeletePolicy - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInput + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SoftDeletePolicy - - - - + - CommandId - - - Script + IsSoftDeleteEnabled @@ -1556,9 +1536,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameter + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegion - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameter + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegion @@ -1566,7 +1546,10 @@ - + + + + @@ -1576,7 +1559,10 @@ Name - Value + RegionalReplicaCount + + + StorageAccountType @@ -1584,21 +1570,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandListResult + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinition - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandListResult + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinition - + - NextLink + Name @@ -1606,33 +1592,55 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandParameterDefinition + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinitionTags - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandParameterDefinition + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinitionTags - + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactManage + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactManage + + + + + - + - + - DefaultValue + Install - Name + Remove - Required + Update @@ -1640,21 +1648,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfile + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSettings - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfile + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSettings - + + + + - Permission + ConfigFileName + + + PackageFileName @@ -1662,21 +1676,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingUpdate + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSource - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingUpdate + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSource - + + + + - OperationType + DefaultConfigurationLink + + + MediaLink @@ -1684,21 +1704,33 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SoftDeletePolicy + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiError - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SoftDeletePolicy + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiError - + + + + + + + - IsSoftDeleteEnabled + Code + + + Message + + + Target @@ -1706,33 +1738,107 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegion + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiErrorBase - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegion + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiErrorBase - + - + - + - Name + Code - RegionalReplicaCount + Message - StorageAccountType + Target + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InnerError + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InnerError + + + + + + + + + + + + + + + Errordetail + + + Exceptiontype + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatus + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatus + + + + + + + + + + + + + + + + + + + + + + + + Code + + + DisplayStatus + + + Level + + + Message + + + Time @@ -1740,12 +1846,15 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinition + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Resource - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinition + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Resource + + + @@ -1753,6 +1862,9 @@ + + Location + Name @@ -1762,9 +1874,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinitionTags + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTags - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinitionTags + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTags @@ -1784,21 +1896,45 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceTags + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandDocument - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceTags + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandDocument - + + + + + + + + + + + + + - Item + Description + + + Label + + + OSType + + + Schema + + + Script @@ -1806,33 +1942,39 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactManage + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandDocumentBase - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactManage + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandDocumentBase - + - + - + + + + - Install + Description - Remove + Label - Update + OSType + + + Schema @@ -1840,27 +1982,133 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactSource + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInput - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactSource + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInput - + - + - DefaultConfigurationLink + CommandId - MediaLink + Script + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameter + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameter + + + + + + + + + + + + + + + Name + + + Value + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandListResult + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandParameterDefinition + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandParameterDefinition + + + + + + + + + + + + + + + + + + DefaultValue + + + Name + + + Required + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceTags + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceTags + + + + + + + + + + + + Item diff --git a/src/Compute/Compute.Autorest/Az.Compute.psm1 b/src/Compute/Compute.Autorest/Az.Compute.psm1 index 4173e0d7a277..67dc918911e9 100644 --- a/src/Compute/Compute.Autorest/Az.Compute.psm1 +++ b/src/Compute/Compute.Autorest/Az.Compute.psm1 @@ -25,17 +25,17 @@ } } if(-not $accountsModule) { - $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.2.3' } | Measure-Object).Count -gt 0 + $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.7.5' } | Measure-Object).Count -gt 0 if($hasAdequateVersion) { - $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.2.3 -Scope Global -PassThru + $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.7.5 -Scope Global -PassThru } } } if(-not $accountsModule) { - Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. For installation instructions, please see: https://docs.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop - } elseif (($accountsModule.Version -lt [System.Version]'2.2.3') -and (-not $localAccounts)) { - Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://docs.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop + } elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) { + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop } Write-Information "Loaded Module '$($accountsModule.Name)'" @@ -50,6 +50,10 @@ # Tweaks the pipeline on module load $instance.OnModuleLoad = $VTable.OnModuleLoad + + # Following two delegates are added for telemetry + $instance.GetTelemetryId = $VTable.GetTelemetryId + $instance.Telemetry = $VTable.Telemetry # Tweaks the pipeline per call diff --git a/src/Compute/Compute.Autorest/Properties/AssemblyInfo.cs b/src/Compute/Compute.Autorest/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..c3f5f77ce06a --- /dev/null +++ b/src/Compute/Compute.Autorest/Properties/AssemblyInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Microsoft Azure Powershell - Compute")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +[assembly: ComVisible(false)] +[assembly: CLSCompliant(false)] +[assembly: Guid("05e53bbe-85c7-4f90-b796-25b4d044090b")] +[assembly: AssemblyVersion("0.1.0")] +[assembly: AssemblyFileVersion("0.1.0")] diff --git a/src/Compute/Compute.Autorest/README.md b/src/Compute/Compute.Autorest/README.md index 6742c91a0c90..2f4c2fadd067 100644 --- a/src/Compute/Compute.Autorest/README.md +++ b/src/Compute/Compute.Autorest/README.md @@ -17,7 +17,7 @@ This directory contains the PowerShell module for the Compute service. This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension. ## Module Requirements -- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.2.3 or greater +- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater ## Authentication AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent. @@ -29,16 +29,16 @@ For information on how to develop for `Az.Compute`, see [how-to.md](how-to.md). ### AutoRest Configuration > see https://aka.ms/autorest ``` yaml -branch: 0c887b0c35f6f19468a16e660bba2a9eb5f4a330 +branch: 4640dfc655f8641962814663fd03fd667e5c1a88 require: # readme.azure.noprofile.md is the common configuration file - $(this-folder)/../../readme.azure.noprofile.md input-file: # You need to specify your swagger files here. - - $(repo)/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/gallery.json + - $(repo)/specification/compute/resource-manager/Microsoft.Compute/stable/2022-01-03/GalleryRP/gallery.json - $(repo)/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/runCommands.json # If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally -module-version: 0.1.0 +module-version: 0.2.0 # Normally, title is the service name title: Compute subject-prefix: "" @@ -149,6 +149,18 @@ directive: parameter-name: PublishingProfileTargetRegion set: parameter-name: TargetRegion + - where: + verb: New|Update + subject: GalleryApplicationVersion + parameter-name: SettingConfigFileName + set: + parameter-name: ConfigFileName + - where: + verb: New|Update + subject: GalleryApplicationVersion + parameter-name: SettingPackageFileName + set: + parameter-name: PackageFileName ### END # change parameter names for GalleryApplicationVersion # hide parameters for New, Update Gallery Application - where: @@ -166,7 +178,7 @@ directive: - where: verb: Update|New subject: GalleryApplicationVersion$ - parameter-name: PublishingProfileEnableHealthCheck|PublishingProfileStorageAccountType|PublishingProfileReplicationMode + parameter-name: PublishingProfileEnableHealthCheck|PublishingProfileStorageAccountType|PublishingProfileReplicationMode|PublishingProfileTargetExtendedLocation|PublishingProfileAdvancedSetting hide: true - where: verb: Update diff --git a/src/Compute/Compute.Autorest/check-dependencies.ps1 b/src/Compute/Compute.Autorest/check-dependencies.ps1 index b02ae9135957..c29591c7bfe1 100644 --- a/src/Compute/Compute.Autorest/check-dependencies.ps1 +++ b/src/Compute/Compute.Autorest/check-dependencies.ps1 @@ -25,7 +25,7 @@ if(-not $Isolated) { function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum, [string]$requiredVersion) { if($predicate) { $module = Get-Module -ListAvailable -Name $moduleName - if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0)) { + if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0) -or ($requiredVersion -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -eq [System.Version]$requiredVersion } | Measure-Object).Count -eq 0)) { $null = New-Item -ItemType Directory -Force -Path $path Write-Host -ForegroundColor Green "Installing local $moduleName module into '$path'..." if ($requiredVersion) { @@ -47,7 +47,7 @@ if(Test-Path -Path $localModulesPath) { $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" } -DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.2.3' +DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.7.5' DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1' $tools = Join-Path $PSScriptRoot 'tools' diff --git a/src/Compute/Compute.Autorest/create-model-cmdlets.ps1 b/src/Compute/Compute.Autorest/create-model-cmdlets.ps1 index 400391802402..04c639459581 100644 --- a/src/Compute/Compute.Autorest/create-model-cmdlets.ps1 +++ b/src/Compute/Compute.Autorest/create-model-cmdlets.ps1 @@ -23,7 +23,7 @@ function CreateModelCmdlet { } $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models' - $ModuleName = 'Az.Compute'.Split(".")[1] + $ModuleName = '' $OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets' $null = New-Item -ItemType Directory -Force -Path $OutputDir @@ -112,13 +112,22 @@ function CreateModelCmdlet { $ParameterDefinePropertyList.Add("HelpMessage=`"${Description}.`"") } $ParameterDefineProperty = [System.String]::Join(", ", $ParameterDefinePropertyList) + # check whether completer is needed + $completer = ''; + if($Type.Split('.').Split('.')[-2] -eq 'Support') { + # If Type is an array, need to strip [] + $strippedType = $Type.Replace('[]', '') + $completer += "`n [ArgumentCompleter([${strippedType}])]" + } $ParameterDefineScript = " - [Parameter($ParameterDefineProperty)] + [Parameter($ParameterDefineProperty)]${completer} [${Type}] `$${Identifier}" $ParameterDefineScriptList.Add($ParameterDefineScript) $ParameterAssignScriptList.Add(" - `$Object.${Identifier} = `$${Identifier}") + if (`$PSBoundParameters.ContainsKey('${Identifier}')) { + `$Object.${Identifier} = `$${Identifier} + }") } } $ParameterDefineScript = $ParameterDefineScriptList | Join-String -Separator "," @@ -142,9 +151,9 @@ function CreateModelCmdlet { <# .Synopsis -Create a in-memory object for ${ObjectType} +Create an in-memory object for ${ObjectType}. .Description -Create a in-memory object for ${ObjectType} +Create an in-memory object for ${ObjectType}. .Outputs ${ObjectTypeWithNamespace} @@ -167,4 +176,4 @@ ${ParameterAssignScript} " Set-Content -Path $OutputPath -Value $Script } -} \ No newline at end of file +} diff --git a/src/Compute/Compute.Autorest/custom/New-AzGalleryApplication.ps1 b/src/Compute/Compute.Autorest/custom/New-AzGalleryApplication.ps1 index 397127689b0d..69fd5b7d9f7b 100644 --- a/src/Compute/Compute.Autorest/custom/New-AzGalleryApplication.ps1 +++ b/src/Compute/Compute.Autorest/custom/New-AzGalleryApplication.ps1 @@ -14,7 +14,7 @@ Create or update a gallery Application Definition. #> function New-AzGalleryApplication { - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication])] [CmdletBinding(PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(Mandatory)] diff --git a/src/Compute/Compute.Autorest/custom/New-AzGalleryApplicationVersion.ps1 b/src/Compute/Compute.Autorest/custom/New-AzGalleryApplicationVersion.ps1 index 806a79c5d432..b291c41d4d20 100644 --- a/src/Compute/Compute.Autorest/custom/New-AzGalleryApplicationVersion.ps1 +++ b/src/Compute/Compute.Autorest/custom/New-AzGalleryApplicationVersion.ps1 @@ -13,7 +13,7 @@ Create or update a gallery Application Version. Create or update a gallery Application Version. #> function New-AzGalleryApplicationVersion { - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion])] [CmdletBinding(DefaultParameterSetName = 'CreateExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(Mandatory)] @@ -120,7 +120,7 @@ function New-AzGalleryApplicationVersion { [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]] # The target regions where the Image Version is going to be replicated to. # This property is updatable. # To construct, see NOTES section for TARGETREGION properties and create a hash table. @@ -192,7 +192,25 @@ function New-AzGalleryApplicationVersion { [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} + ${ProxyUseDefaultCredentials}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.String] + # Optional. + # The name to assign the downloaded package file on the VM. + # This is limited to 4096 characters. + # If not specified, the package file will be named the same as the Gallery Application name. + ${PackageFileName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.String] + # Optional. + # The name to assign the downloaded config file on the VM. + # This is limited to 4096 characters. + # If not specified, the config file will be named the Gallery Application name appended with "_config". + ${ConfigFileName} ) process { Az.Compute.internal\New-AzGalleryApplicationVersion @PSBoundParameters diff --git a/src/Compute/Compute.Autorest/custom/Update-AzGalleryApplicationVersion.ps1 b/src/Compute/Compute.Autorest/custom/Update-AzGalleryApplicationVersion.ps1 index e55b45b40dc5..2bf1e75888c0 100644 --- a/src/Compute/Compute.Autorest/custom/Update-AzGalleryApplicationVersion.ps1 +++ b/src/Compute/Compute.Autorest/custom/Update-AzGalleryApplicationVersion.ps1 @@ -14,7 +14,7 @@ Update a gallery Application Version. #> function Update-AzGalleryApplicationVersion { - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -98,7 +98,7 @@ function Update-AzGalleryApplicationVersion { [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, @@ -106,7 +106,7 @@ function Update-AzGalleryApplicationVersion { [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]] # The target regions where the Image Version is going to be replicated to. # This property is updatable. # To construct, see NOTES section for TARGETREGION properties and create a hash table. diff --git a/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplication.md b/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplication.md index b6528f2b4b2b..54fd8cb962b1 100644 --- a/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplication.md +++ b/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplication.md @@ -36,16 +36,14 @@ Retrieves information about a gallery Application Definition. ### Example 1: Get a Gallery Application in a Gallery ```powershell -PS C:\> Get-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -name $galleryAppName - +Get-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -name $galleryAppName ``` Retrieve a Gallery Application resource with the provided Resource Group, Gallery, and Gallery Application name. ### Example 2: Get all the Gallery Applications in a Gallery ```powershell -PS C:\> Get-AzGalleryApplication -GalleryName $GalleryName -ResourceGroupName $rgName - +Get-AzGalleryApplication -GalleryName $GalleryName -ResourceGroupName $rgName ``` Retrieve all the Gallery Application resources in the provided Resource Group and Gallery. @@ -153,7 +151,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication ## NOTES @@ -164,7 +162,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. diff --git a/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplicationVersion.md index 4547616a693a..5b606c356fb7 100644 --- a/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplicationVersion.md @@ -38,16 +38,14 @@ Retrieves information about a gallery Application Version. ### Example 1: Get a Gallery Application Version ```powershell -PS C:\> Get-AzGalleryApplicationVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryApplicationName $galleryAppName -Name $versionName - +Get-AzGalleryApplicationVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryApplicationName $galleryAppName -Name $versionName ``` Retrieve a Gallery Application Version resource with the provided Resource Group, Gallery, Gallery Application name, and version name. ### Example 2: Get all the Gallery Application Versions in a GalleryApplication ```powershell -PS C:\> Get-AzGalleryApplicationVersion -GalleryName $GalleryName -ResourceGroupName $rgName -GalleryApplicationName $galleryAppName - +Get-AzGalleryApplicationVersion -GalleryName $GalleryName -ResourceGroupName $rgName -GalleryApplicationName $galleryAppName ``` Retrieve all the Gallery Application Version resources in the provided Resource Group, Gallery, and Gallery Application Name. @@ -185,7 +183,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion ## NOTES @@ -196,7 +194,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. diff --git a/src/Compute/Compute.Autorest/docs/Get-AzVMRunCommand.md b/src/Compute/Compute.Autorest/docs/Get-AzVMRunCommand.md index 95560b52ebef..2d28d6f5e67f 100644 --- a/src/Compute/Compute.Autorest/docs/Get-AzVMRunCommand.md +++ b/src/Compute/Compute.Autorest/docs/Get-AzVMRunCommand.md @@ -48,8 +48,10 @@ Gets specific run command for a subscription in a location. ### Example 1: Get Run Command by Name ```powershell -PS C:\> Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand2" +Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand2" +``` +```output Location Name Type -------- ---- ---- eastus firstruncommand2 Microsoft.Compute/virtualMachines/runCommands @@ -59,8 +61,10 @@ Get Run Command by it's name. ### Example 2: Get Run Commands by VM ```powershell -PS C:\> Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname +Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname +``` +```output Location Name Type -------- ---- ---- eastus firstruncommand Microsoft.Compute/virtualMachines/runCommands @@ -233,7 +237,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. diff --git a/src/Compute/Compute.Autorest/docs/Get-AzVmssVMRunCommand.md b/src/Compute/Compute.Autorest/docs/Get-AzVmssVMRunCommand.md index 467551999d6b..8249da5e4fe8 100644 --- a/src/Compute/Compute.Autorest/docs/Get-AzVmssVMRunCommand.md +++ b/src/Compute/Compute.Autorest/docs/Get-AzVmssVMRunCommand.md @@ -38,8 +38,10 @@ The operation to get the VMSS VM run command. ### Example 1: Get RunCommand by name ```powershell -PS C:\> Get-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname +Get-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname +``` +```output Location Name Type -------- ---- ---- eastus first Microsoft.Compute/virtualMachineScaleSets/virtualMachines/runCommands @@ -49,8 +51,10 @@ Get by runcommand name ### Example 2: Get RunCommand by Instance ```powershell -PS C:\> Get-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -VMScaleSetName $vmssname +Get-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -VMScaleSetName $vmssname +``` +```output Location Name Type -------- ---- ---- eastus first Microsoft.Compute/virtualMachineScaleSets/virtualMachines/runCommands @@ -202,7 +206,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. diff --git a/src/Compute/Compute.Autorest/docs/New-AzGalleryApplication.md b/src/Compute/Compute.Autorest/docs/New-AzGalleryApplication.md index ae7240f1842e..da51e2c95c0c 100644 --- a/src/Compute/Compute.Autorest/docs/New-AzGalleryApplication.md +++ b/src/Compute/Compute.Autorest/docs/New-AzGalleryApplication.md @@ -25,8 +25,7 @@ Create or update a gallery Application Definition. ### Example 1: Create a gallery application ```powershell -PS C:\> New-AzGalleryApplication -ResourceGroupName $rgName -Location EastUS -GalleryName $galleryName -Name $name -SupportedOSType Windows - +New-AzGalleryApplication -ResourceGroupName $rgName -Location EastUS -GalleryName $galleryName -Name $name -SupportedOSType Windows ``` Creating a Gallery Application in a Gallery. @@ -247,7 +246,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication ## NOTES diff --git a/src/Compute/Compute.Autorest/docs/New-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/docs/New-AzGalleryApplicationVersion.md index df0f3ea4f368..dfeebb1c66a4 100644 --- a/src/Compute/Compute.Autorest/docs/New-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute.Autorest/docs/New-AzGalleryApplicationVersion.md @@ -15,7 +15,8 @@ Create or update a gallery Application Version. ``` New-AzGalleryApplicationVersion -GalleryApplicationName -GalleryName -Name -ResourceGroupName -Install -Location -Remove [-SubscriptionId ] - [-DefaultConfigFileLink ] [-PackageFileLink ] [-PublishingProfileEndOfLifeDate ] + [-ConfigFileName ] [-DefaultConfigFileLink ] [-PackageFileLink ] + [-PackageFileName ] [-PublishingProfileEndOfLifeDate ] [-PublishingProfileExcludeFromLatest] [-ReplicaCount ] [-Tag ] [-TargetRegion ] [-Update ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] @@ -28,14 +29,13 @@ Create or update a gallery Application Version. ### Example 1: Create a gallery application version. ```powershell -PS C:\> $ctx = New-AzStorageContext -StorageAccountName $storAccName -PS C:\> $SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r -PS C:\> $storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName -PS C:\> $blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context -PS C:\> $SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context -PS C:\> $SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken -PS C:\> New-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -Install "powershell -command 'Expand-Archive -Path package.zip -DestinationPath C:\\package\'" -Remove "del C:\\package" - +$ctx = New-AzStorageContext -StorageAccountName $storAccName +$SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r +$storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName +$blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context +$SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context +$SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken +New-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -Install "powershell -command 'Expand-Archive -Path package.zip -DestinationPath C:\\package\'" -Remove "del C:\\package" ``` Creating a Gallery Application Version. @@ -58,6 +58,24 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ConfigFileName +Optional. +The name to assign the downloaded config file on the VM. +This is limited to 4096 characters. +If not specified, the config file will be named the Gallery Application name appended with "_config". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -DefaultConfigFileLink Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. @@ -200,6 +218,24 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -PackageFileName +Optional. +The name to assign the downloaded package file on the VM. +This is limited to 4096 characters. +If not specified, the package file will be named the same as the Gallery Application name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PublishingProfileEndOfLifeDate The end of life date of the gallery image version. This property can be used for decommissioning purposes. @@ -318,7 +354,7 @@ This property is updatable. To construct, see NOTES section for TARGETREGION properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] +Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] Parameter Sets: (All) Aliases: @@ -385,7 +421,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion ## NOTES @@ -396,13 +432,15 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -TARGETREGION : The target regions where the Image Version is going to be replicated to. This property is updatable. +`TARGETREGION `: The target regions where the Image Version is going to be replicated to. This property is updatable. - `Name `: The name of the region. - `[EncryptionDataDiskImage ]`: A list of encryption specifications for data disk images. - `Lun `: This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. - `[DiskEncryptionSetId ]`: A relative URI containing the resource ID of the disk encryption set. - `[OSDiskImageDiskEncryptionSetId ]`: A relative URI containing the resource ID of the disk encryption set. - `[RegionalReplicaCount ]`: The number of replicas of the Image Version to be created per region. This property is updatable. + - `[SecurityProfileConfidentialVMEncryptionType ]`: confidential VM encryption types + - `[SecurityProfileSecureVMDiskEncryptionSetId ]`: secure VM disk encryption set id - `[StorageAccountType ]`: Specifies the storage account type to be used to store the image. This property is not updatable. ## RELATED LINKS diff --git a/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplication.md b/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplication.md index d6803ef7ef02..24f925e42a8d 100644 --- a/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplication.md +++ b/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplication.md @@ -32,8 +32,7 @@ Delete a gallery Application. ### Example 1: Remove a Gallery Application ```powershell -PS C:\> Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -Name $name - +Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -Name $name ``` Delete a gallery application. @@ -228,7 +227,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. diff --git a/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplicationVersion.md index 380432e1ebac..fd7bd3cccde7 100644 --- a/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplicationVersion.md @@ -32,8 +32,7 @@ Delete a gallery Application Version. ### Example 1: Remove a Gallery Application Version ```powershell -PS C:\> Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -Name $name - +Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -Name $name ``` Delete a gallery application version. @@ -243,7 +242,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. diff --git a/src/Compute/Compute.Autorest/docs/Remove-AzVMRunCommand.md b/src/Compute/Compute.Autorest/docs/Remove-AzVMRunCommand.md index 53f71df62ea8..406d39557eb7 100644 --- a/src/Compute/Compute.Autorest/docs/Remove-AzVMRunCommand.md +++ b/src/Compute/Compute.Autorest/docs/Remove-AzVMRunCommand.md @@ -32,8 +32,7 @@ The operation to delete the run command. ### Example 1: Remove Run Command ```powershell -PS C:\> Remove-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand" - +Remove-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand" ``` Remove a Run Command by its Name @@ -228,7 +227,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. diff --git a/src/Compute/Compute.Autorest/docs/Remove-AzVmssVMRunCommand.md b/src/Compute/Compute.Autorest/docs/Remove-AzVmssVMRunCommand.md index 9366ece39ffb..5460f00792d0 100644 --- a/src/Compute/Compute.Autorest/docs/Remove-AzVmssVMRunCommand.md +++ b/src/Compute/Compute.Autorest/docs/Remove-AzVmssVMRunCommand.md @@ -32,8 +32,7 @@ The operation to delete the VMSS VM run command. ### Example 1: Remove VMSS VM RunCommand ```powershell -PS C:\> Remove-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname - +Remove-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname ``` Remove VMSS VM RunCommand @@ -243,7 +242,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. diff --git a/src/Compute/Compute.Autorest/docs/Set-AzVMRunCommand.md b/src/Compute/Compute.Autorest/docs/Set-AzVMRunCommand.md index 88bda3cc1c24..4bb08dc8cca9 100644 --- a/src/Compute/Compute.Autorest/docs/Set-AzVMRunCommand.md +++ b/src/Compute/Compute.Autorest/docs/Set-AzVMRunCommand.md @@ -28,8 +28,10 @@ The operation to create or update the run command. ### Example 1: Simple Example ```powershell -PS C:\> Set-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName 'firstruncommand' +Set-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName 'firstruncommand' +``` +```output Location Name Type -------- ---- ---- eastus firstruncommand2 Microsoft.Compute/virtualMachines/runCommands @@ -392,11 +394,11 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -PARAMETER : The parameters used by the script. +`PARAMETER `: The parameters used by the script. - `Name `: The run command parameter name. - `Value `: The run command parameter value. -PROTECTEDPARAMETER : The parameters used by the script. +`PROTECTEDPARAMETER `: The parameters used by the script. - `Name `: The run command parameter name. - `Value `: The run command parameter value. diff --git a/src/Compute/Compute.Autorest/docs/Set-AzVmssVMRunCommand.md b/src/Compute/Compute.Autorest/docs/Set-AzVmssVMRunCommand.md index 86a7e1ed9cb0..92e8be02e497 100644 --- a/src/Compute/Compute.Autorest/docs/Set-AzVmssVMRunCommand.md +++ b/src/Compute/Compute.Autorest/docs/Set-AzVmssVMRunCommand.md @@ -29,8 +29,10 @@ The operation to create or update the VMSS VM run command. ### Example 1: Set RunCommand by name ```powershell -PS C:\> Set-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname +Set-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname +``` +```output Location Name Type -------- ---- ---- eastus first Microsoft.Compute/virtualMachineScaleSets/virtualMachines/runCommands @@ -408,11 +410,11 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -PARAMETER : The parameters used by the script. +`PARAMETER `: The parameters used by the script. - `Name `: The run command parameter name. - `Value `: The run command parameter value. -PROTECTEDPARAMETER : The parameters used by the script. +`PROTECTEDPARAMETER `: The parameters used by the script. - `Name `: The run command parameter name. - `Value `: The run command parameter value. diff --git a/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplication.md b/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplication.md index 33eb63c0a0bc..e096aab86a5a 100644 --- a/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplication.md +++ b/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplication.md @@ -32,8 +32,7 @@ Update a gallery Application Definition. ### Example 1: Update a Gallery Application ```powershell -PS C:\> Update-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -Name $name -Description "New Description" - +Update-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -Name $name -Description "New Description" ``` Updating a Gallery Application. @@ -235,7 +234,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication ## NOTES @@ -246,7 +245,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. diff --git a/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplicationVersion.md index ab6163f8a1c0..ff9013fa04ea 100644 --- a/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplicationVersion.md @@ -38,13 +38,13 @@ Update a gallery Application Version. ### Example 1: Update Replica Count of Gallery Application Version ```powershell -PS C:\> $ctx = New-AzStorageContext -StorageAccountName $storAccName -PS C:\> $SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r -PS C:\> $storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName -PS C:\> $blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context -PS C:\> $SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context -PS C:\> $SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken -PS C:\> Update-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -ReplicaCount 3 +$ctx = New-AzStorageContext -StorageAccountName $storAccName +$SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r +$storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName +$blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context +$SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context +$SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken +Update-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -ReplicaCount 3 ``` Updating a Gallery Application Version's replica count. @@ -294,7 +294,7 @@ This property is updatable. To construct, see NOTES section for TARGETREGION properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] +Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] Parameter Sets: (All) Aliases: @@ -345,7 +345,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion ## NOTES @@ -356,7 +356,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. @@ -372,13 +372,15 @@ INPUTOBJECT : Identity Parameter - `[VMName ]`: The name of the virtual machine where the run command should be created or updated. - `[VMScaleSetName ]`: The name of the VM scale set. -TARGETREGION : The target regions where the Image Version is going to be replicated to. This property is updatable. +`TARGETREGION `: The target regions where the Image Version is going to be replicated to. This property is updatable. - `Name `: The name of the region. - `[EncryptionDataDiskImage ]`: A list of encryption specifications for data disk images. - `Lun `: This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. - `[DiskEncryptionSetId ]`: A relative URI containing the resource ID of the disk encryption set. - `[OSDiskImageDiskEncryptionSetId ]`: A relative URI containing the resource ID of the disk encryption set. - `[RegionalReplicaCount ]`: The number of replicas of the Image Version to be created per region. This property is updatable. + - `[SecurityProfileConfidentialVMEncryptionType ]`: confidential VM encryption types + - `[SecurityProfileSecureVMDiskEncryptionSetId ]`: secure VM disk encryption set id - `[StorageAccountType ]`: Specifies the storage account type to be used to store the image. This property is not updatable. ## RELATED LINKS diff --git a/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplication.md b/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplication.md index 33ce5802e918..00174bcd7359 100644 --- a/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplication.md +++ b/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplication.md @@ -1,15 +1,13 @@ ### Example 1: Get a Gallery Application in a Gallery ```powershell -PS C:\> Get-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -name $galleryAppName - +Get-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -name $galleryAppName ``` Retrieve a Gallery Application resource with the provided Resource Group, Gallery, and Gallery Application name. ### Example 2: Get all the Gallery Applications in a Gallery ```powershell -PS C:\> Get-AzGalleryApplication -GalleryName $GalleryName -ResourceGroupName $rgName - +Get-AzGalleryApplication -GalleryName $GalleryName -ResourceGroupName $rgName ``` Retrieve all the Gallery Application resources in the provided Resource Group and Gallery. \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplicationVersion.md index be7700c157be..5bc9673e836e 100644 --- a/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplicationVersion.md @@ -1,15 +1,13 @@ ### Example 1: Get a Gallery Application Version ```powershell -PS C:\> Get-AzGalleryApplicationVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryApplicationName $galleryAppName -Name $versionName - +Get-AzGalleryApplicationVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryApplicationName $galleryAppName -Name $versionName ``` Retrieve a Gallery Application Version resource with the provided Resource Group, Gallery, Gallery Application name, and version name. ### Example 2: Get all the Gallery Application Versions in a GalleryApplication ```powershell -PS C:\> Get-AzGalleryApplicationVersion -GalleryName $GalleryName -ResourceGroupName $rgName -GalleryApplicationName $galleryAppName - +Get-AzGalleryApplicationVersion -GalleryName $GalleryName -ResourceGroupName $rgName -GalleryApplicationName $galleryAppName ``` Retrieve all the Gallery Application Version resources in the provided Resource Group, Gallery, and Gallery Application Name. \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/examples/Get-AzVMRunCommand.md b/src/Compute/Compute.Autorest/examples/Get-AzVMRunCommand.md index 6031b68ae1bb..e374179a1fe6 100644 --- a/src/Compute/Compute.Autorest/examples/Get-AzVMRunCommand.md +++ b/src/Compute/Compute.Autorest/examples/Get-AzVMRunCommand.md @@ -1,7 +1,9 @@ ### Example 1: Get Run Command by Name ```powershell -PS C:\> Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand2" +Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand2" +``` +```output Location Name Type -------- ---- ---- eastus firstruncommand2 Microsoft.Compute/virtualMachines/runCommands @@ -11,8 +13,10 @@ Get Run Command by it's name. ### Example 2: Get Run Commands by VM ```powershell -PS C:\> Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname +Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname +``` +```output Location Name Type -------- ---- ---- eastus firstruncommand Microsoft.Compute/virtualMachines/runCommands diff --git a/src/Compute/Compute.Autorest/examples/Get-AzVmssVMRunCommand.md b/src/Compute/Compute.Autorest/examples/Get-AzVmssVMRunCommand.md index 2482da7f8ab5..add6b859fa07 100644 --- a/src/Compute/Compute.Autorest/examples/Get-AzVmssVMRunCommand.md +++ b/src/Compute/Compute.Autorest/examples/Get-AzVmssVMRunCommand.md @@ -1,7 +1,9 @@ ### Example 1: Get RunCommand by name ```powershell -PS C:\> Get-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname +Get-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname +``` +```output Location Name Type -------- ---- ---- eastus first Microsoft.Compute/virtualMachineScaleSets/virtualMachines/runCommands @@ -11,8 +13,10 @@ Get by runcommand name ### Example 2: Get RunCommand by Instance ```powershell -PS C:\> Get-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -VMScaleSetName $vmssname +Get-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -VMScaleSetName $vmssname +``` +```output Location Name Type -------- ---- ---- eastus first Microsoft.Compute/virtualMachineScaleSets/virtualMachines/runCommands diff --git a/src/Compute/Compute.Autorest/examples/New-AzGalleryApplication.md b/src/Compute/Compute.Autorest/examples/New-AzGalleryApplication.md index bf3bc88f2294..70cfba822408 100644 --- a/src/Compute/Compute.Autorest/examples/New-AzGalleryApplication.md +++ b/src/Compute/Compute.Autorest/examples/New-AzGalleryApplication.md @@ -1,7 +1,6 @@ ### Example 1: Create a gallery application ```powershell -PS C:\> New-AzGalleryApplication -ResourceGroupName $rgName -Location EastUS -GalleryName $galleryName -Name $name -SupportedOSType Windows - +New-AzGalleryApplication -ResourceGroupName $rgName -Location EastUS -GalleryName $galleryName -Name $name -SupportedOSType Windows ``` Creating a Gallery Application in a Gallery. diff --git a/src/Compute/Compute.Autorest/examples/New-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/examples/New-AzGalleryApplicationVersion.md index 4d1a5c1d498e..410fcefb85f5 100644 --- a/src/Compute/Compute.Autorest/examples/New-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute.Autorest/examples/New-AzGalleryApplicationVersion.md @@ -1,13 +1,12 @@ ### Example 1: Create a gallery application version. ```powershell -PS C:\> $ctx = New-AzStorageContext -StorageAccountName $storAccName -PS C:\> $SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r -PS C:\> $storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName -PS C:\> $blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context -PS C:\> $SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context -PS C:\> $SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken -PS C:\> New-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -Install "powershell -command 'Expand-Archive -Path package.zip -DestinationPath C:\\package\'" -Remove "del C:\\package" - +$ctx = New-AzStorageContext -StorageAccountName $storAccName +$SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r +$storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName +$blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context +$SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context +$SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken +New-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -Install "powershell -command 'Expand-Archive -Path package.zip -DestinationPath C:\\package\'" -Remove "del C:\\package" ``` Creating a Gallery Application Version. Using SAS Uri for the blob for PackageFileLink. diff --git a/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplication.md b/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplication.md index 0b27382d6129..e7d7074a471a 100644 --- a/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplication.md +++ b/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplication.md @@ -1,7 +1,6 @@ ### Example 1: Remove a Gallery Application ```powershell -PS C:\> Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -Name $name - +Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -Name $name ``` Delete a gallery application. diff --git a/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplicationVersion.md index b06b8cf84c9d..14bf093378a7 100644 --- a/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplicationVersion.md @@ -1,7 +1,6 @@ ### Example 1: Remove a Gallery Application Version ```powershell -PS C:\> Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -Name $name - +Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -Name $name ``` Delete a gallery application version. diff --git a/src/Compute/Compute.Autorest/examples/Remove-AzVMRunCommand.md b/src/Compute/Compute.Autorest/examples/Remove-AzVMRunCommand.md index d7c9a5185a28..b3af41536d68 100644 --- a/src/Compute/Compute.Autorest/examples/Remove-AzVMRunCommand.md +++ b/src/Compute/Compute.Autorest/examples/Remove-AzVMRunCommand.md @@ -1,7 +1,6 @@ ### Example 1: Remove Run Command ```powershell -PS C:\> Remove-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand" - +Remove-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand" ``` Remove a Run Command by its Name \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/examples/Remove-AzVmssVMRunCommand.md b/src/Compute/Compute.Autorest/examples/Remove-AzVmssVMRunCommand.md index 2de72dd1a274..e96c6ae64cad 100644 --- a/src/Compute/Compute.Autorest/examples/Remove-AzVmssVMRunCommand.md +++ b/src/Compute/Compute.Autorest/examples/Remove-AzVmssVMRunCommand.md @@ -1,7 +1,6 @@ ### Example 1: Remove VMSS VM RunCommand ```powershell -PS C:\> Remove-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname - +Remove-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname ``` Remove VMSS VM RunCommand \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/examples/Set-AzVMRunCommand.md b/src/Compute/Compute.Autorest/examples/Set-AzVMRunCommand.md index cce9c6484edd..3a0ed5328a3f 100644 --- a/src/Compute/Compute.Autorest/examples/Set-AzVMRunCommand.md +++ b/src/Compute/Compute.Autorest/examples/Set-AzVMRunCommand.md @@ -1,7 +1,9 @@ ### Example 1: Simple Example ```powershell -PS C:\> Set-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -Location 'eastus' -RunCommandName 'firstruncommand' +Set-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName 'firstruncommand' +``` +```output Location Name Type -------- ---- ---- eastus firstruncommand Microsoft.Compute/virtualMachines/runCommands diff --git a/src/Compute/Compute.Autorest/examples/Set-AzVmssVMRunCommand.md b/src/Compute/Compute.Autorest/examples/Set-AzVmssVMRunCommand.md index 07fa97846e91..836f4892db84 100644 --- a/src/Compute/Compute.Autorest/examples/Set-AzVmssVMRunCommand.md +++ b/src/Compute/Compute.Autorest/examples/Set-AzVmssVMRunCommand.md @@ -1,7 +1,9 @@ ### Example 1: Set RunCommand by name ```powershell -PS C:\> Set-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname +Set-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname +``` +```output Location Name Type -------- ---- ---- eastus first Microsoft.Compute/virtualMachineScaleSets/virtualMachines/runCommands diff --git a/src/Compute/Compute.Autorest/examples/Update-AzGalleryApplication.md b/src/Compute/Compute.Autorest/examples/Update-AzGalleryApplication.md index 976e5c395a11..a38bbbbcd101 100644 --- a/src/Compute/Compute.Autorest/examples/Update-AzGalleryApplication.md +++ b/src/Compute/Compute.Autorest/examples/Update-AzGalleryApplication.md @@ -1,7 +1,6 @@ ### Example 1: Update a Gallery Application ```powershell -PS C:\> Update-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -Name $name -Description "New Description" - +Update-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -Name $name -Description "New Description" ``` Updating a Gallery Application. diff --git a/src/Compute/Compute.Autorest/examples/Update-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/examples/Update-AzGalleryApplicationVersion.md index d3ae4edcca94..f40b846457d3 100644 --- a/src/Compute/Compute.Autorest/examples/Update-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute.Autorest/examples/Update-AzGalleryApplicationVersion.md @@ -1,12 +1,12 @@ ### Example 1: Update Replica Count of Gallery Application Version ```powershell -PS C:\> $ctx = New-AzStorageContext -StorageAccountName $storAccName -PS C:\> $SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r -PS C:\> $storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName -PS C:\> $blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context -PS C:\> $SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context -PS C:\> $SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken -PS C:\> Update-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -ReplicaCount 3 +$ctx = New-AzStorageContext -StorageAccountName $storAccName +$SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r +$storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName +$blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context +$SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context +$SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken +Update-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -ReplicaCount 3 ``` Updating a Gallery Application Version's replica count. Using SAS Uri for the blob for PackageFileLink. \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplication.ps1 b/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplication.ps1 index 747fc9a2c902..b8b06721e616 100644 --- a/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplication.ps1 +++ b/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplication.ps1 @@ -20,16 +20,14 @@ Retrieves information about a gallery Application Definition. .Description Retrieves information about a gallery Application Definition. .Example -PS C:\> Get-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -name $galleryAppName - +Get-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -name $galleryAppName .Example -PS C:\> Get-AzGalleryApplication -GalleryName $GalleryName -ResourceGroupName $rgName - +Get-AzGalleryApplication -GalleryName $GalleryName -ResourceGroupName $rgName .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication .Notes COMPLEX PARAMETER PROPERTIES @@ -54,7 +52,7 @@ INPUTOBJECT : Identity Parameter https://docs.microsoft.com/powershell/module/az.compute/get-azgalleryapplication #> function Get-AzGalleryApplication { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -149,6 +147,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.Compute.private\Get-AzGalleryApplication_Get'; GetViaIdentity = 'Az.Compute.private\Get-AzGalleryApplication_GetViaIdentity'; @@ -164,6 +180,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -172,15 +189,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplicationVersion.ps1 b/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplicationVersion.ps1 index ebbb0a1ccb78..35f5920a8084 100644 --- a/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplicationVersion.ps1 +++ b/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplicationVersion.ps1 @@ -20,16 +20,14 @@ Retrieves information about a gallery Application Version. .Description Retrieves information about a gallery Application Version. .Example -PS C:\> Get-AzGalleryApplicationVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryApplicationName $galleryAppName -Name $versionName - +Get-AzGalleryApplicationVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryApplicationName $galleryAppName -Name $versionName .Example -PS C:\> Get-AzGalleryApplicationVersion -GalleryName $GalleryName -ResourceGroupName $rgName -GalleryApplicationName $galleryAppName - +Get-AzGalleryApplicationVersion -GalleryName $GalleryName -ResourceGroupName $rgName -GalleryApplicationName $galleryAppName .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion .Notes COMPLEX PARAMETER PROPERTIES @@ -54,7 +52,7 @@ INPUTOBJECT : Identity Parameter https://docs.microsoft.com/powershell/module/az.compute/get-azgalleryapplicationversion #> function Get-AzGalleryApplicationVersion { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -164,6 +162,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.Compute.private\Get-AzGalleryApplicationVersion_Get'; GetViaIdentity = 'Az.Compute.private\Get-AzGalleryApplicationVersion_GetViaIdentity'; @@ -179,6 +195,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -187,15 +204,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/Compute/Compute.Autorest/exports/Get-AzVMRunCommand.ps1 b/src/Compute/Compute.Autorest/exports/Get-AzVMRunCommand.ps1 index 1812850ef789..89d95f2e8c58 100644 --- a/src/Compute/Compute.Autorest/exports/Get-AzVMRunCommand.ps1 +++ b/src/Compute/Compute.Autorest/exports/Get-AzVMRunCommand.ps1 @@ -20,19 +20,9 @@ Gets specific run command for a subscription in a location. .Description Gets specific run command for a subscription in a location. .Example -PS C:\> Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand2" - -Location Name Type --------- ---- ---- -eastus firstruncommand2 Microsoft.Compute/virtualMachines/runCommands +Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand2" .Example -PS C:\> Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname - -Location Name Type --------- ---- ---- -eastus firstruncommand Microsoft.Compute/virtualMachines/runCommands -eastus firstruncommand2 Microsoft.Compute/virtualMachines/runCommands -eastus firstruncommand3 Microsoft.Compute/virtualMachines/runCommands +Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity @@ -182,6 +172,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.Compute.private\Get-AzVMRunCommand_Get'; Get1 = 'Az.Compute.private\Get-AzVMRunCommand_Get1'; @@ -199,6 +207,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -207,15 +216,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/Compute/Compute.Autorest/exports/Get-AzVmssVMRunCommand.ps1 b/src/Compute/Compute.Autorest/exports/Get-AzVmssVMRunCommand.ps1 index 2e997e4dda22..013f47377622 100644 --- a/src/Compute/Compute.Autorest/exports/Get-AzVmssVMRunCommand.ps1 +++ b/src/Compute/Compute.Autorest/exports/Get-AzVmssVMRunCommand.ps1 @@ -20,17 +20,9 @@ The operation to get the VMSS VM run command. .Description The operation to get the VMSS VM run command. .Example -PS C:\> Get-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname - -Location Name Type --------- ---- ---- -eastus first Microsoft.Compute/virtualMachineScaleSets/virtualMachines/runCommands +Get-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname .Example -PS C:\> Get-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -VMScaleSetName $vmssname - -Location Name Type --------- ---- ---- -eastus first Microsoft.Compute/virtualMachineScaleSets/virtualMachines/runCommands +Get-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -VMScaleSetName $vmssname .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity @@ -167,6 +159,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.Compute.private\Get-AzVmssVMRunCommand_Get'; GetViaIdentity = 'Az.Compute.private\Get-AzVmssVMRunCommand_GetViaIdentity'; @@ -182,6 +192,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -190,15 +201,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/Compute/Compute.Autorest/exports/New-AzGalleryApplication.ps1 b/src/Compute/Compute.Autorest/exports/New-AzGalleryApplication.ps1 index 39f9c36a30d0..6e25d03d9d84 100644 --- a/src/Compute/Compute.Autorest/exports/New-AzGalleryApplication.ps1 +++ b/src/Compute/Compute.Autorest/exports/New-AzGalleryApplication.ps1 @@ -20,16 +20,15 @@ Create or update a gallery Application Definition. .Description Create or update a gallery Application Definition. .Example -PS C:\> New-AzGalleryApplication -ResourceGroupName $rgName -Location EastUS -GalleryName $galleryName -Name $name -SupportedOSType Windows - +New-AzGalleryApplication -ResourceGroupName $rgName -Location EastUS -GalleryName $galleryName -Name $name -SupportedOSType Windows .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication .Link https://docs.microsoft.com/powershell/module/az.compute/new-azgalleryapplication #> function New-AzGalleryApplication { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication])] [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -162,6 +161,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ __AllParameterSets = 'Az.Compute.custom\New-AzGalleryApplication'; } @@ -175,6 +192,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -183,15 +201,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/Compute/Compute.Autorest/exports/New-AzGalleryApplicationVersion.ps1 b/src/Compute/Compute.Autorest/exports/New-AzGalleryApplicationVersion.ps1 index e619a3a856bf..74057df7a18e 100644 --- a/src/Compute/Compute.Autorest/exports/New-AzGalleryApplicationVersion.ps1 +++ b/src/Compute/Compute.Autorest/exports/New-AzGalleryApplicationVersion.ps1 @@ -20,17 +20,16 @@ Create or update a gallery Application Version. .Description Create or update a gallery Application Version. .Example -PS C:\> $ctx = New-AzStorageContext -StorageAccountName $storAccName -PS C:\> $SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r -PS C:\> $storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName -PS C:\> $blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context -PS C:\> $SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context -PS C:\> $SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken -PS C:\> New-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -Install "powershell -command 'Expand-Archive -Path package.zip -DestinationPath C:\\package\'" -Remove "del C:\\package" - +$ctx = New-AzStorageContext -StorageAccountName $storAccName +$SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r +$storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName +$blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context +$SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context +$SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken +New-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -Install "powershell -command 'Expand-Archive -Path package.zip -DestinationPath C:\\package\'" -Remove "del C:\\package" .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion .Notes COMPLEX PARAMETER PROPERTIES @@ -43,12 +42,14 @@ TARGETREGION : The target regions where the Image Version is go [DiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. [OSDiskImageDiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. [RegionalReplicaCount ]: The number of replicas of the Image Version to be created per region. This property is updatable. + [SecurityProfileConfidentialVMEncryptionType ]: confidential VM encryption types + [SecurityProfileSecureVMDiskEncryptionSetId ]: secure VM disk encryption set id [StorageAccountType ]: Specifies the storage account type to be used to store the image. This property is not updatable. .Link https://docs.microsoft.com/powershell/module/az.compute/new-azgalleryapplicationversion #> function New-AzGalleryApplicationVersion { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -155,7 +156,7 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]] # The target regions where the Image Version is going to be replicated to. # This property is updatable. # To construct, see NOTES section for TARGETREGION properties and create a hash table. @@ -170,6 +171,24 @@ param( # This is limited to 4096 characters. ${Update}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.String] + # Optional. + # The name to assign the downloaded package file on the VM. + # This is limited to 4096 characters. + # If not specified, the package file will be named the same as the Gallery Application name. + ${PackageFileName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.String] + # Optional. + # The name to assign the downloaded config file on the VM. + # This is limited to 4096 characters. + # If not specified, the config file will be named the Gallery Application name appended with "_config". + ${ConfigFileName}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -237,6 +256,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ CreateExpanded = 'Az.Compute.custom\New-AzGalleryApplicationVersion'; } @@ -250,6 +287,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -258,15 +296,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/Compute/Compute.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/Compute/Compute.Autorest/exports/ProxyCmdletDefinitions.ps1 index 2a50ce799f08..72e3e1009f2e 100644 --- a/src/Compute/Compute.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/src/Compute/Compute.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -20,16 +20,14 @@ Retrieves information about a gallery Application Version. .Description Retrieves information about a gallery Application Version. .Example -PS C:\> Get-AzGalleryApplicationVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryApplicationName $galleryAppName -Name $versionName - +Get-AzGalleryApplicationVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryApplicationName $galleryAppName -Name $versionName .Example -PS C:\> Get-AzGalleryApplicationVersion -GalleryName $GalleryName -ResourceGroupName $rgName -GalleryApplicationName $galleryAppName - +Get-AzGalleryApplicationVersion -GalleryName $GalleryName -ResourceGroupName $rgName -GalleryApplicationName $galleryAppName .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion .Notes COMPLEX PARAMETER PROPERTIES @@ -54,7 +52,7 @@ INPUTOBJECT : Identity Parameter https://docs.microsoft.com/powershell/module/az.compute/get-azgalleryapplicationversion #> function Get-AzGalleryApplicationVersion { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -164,6 +162,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.Compute.private\Get-AzGalleryApplicationVersion_Get'; GetViaIdentity = 'Az.Compute.private\Get-AzGalleryApplicationVersion_GetViaIdentity'; @@ -179,6 +195,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -187,17 +204,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -206,16 +240,14 @@ Retrieves information about a gallery Application Definition. .Description Retrieves information about a gallery Application Definition. .Example -PS C:\> Get-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -name $galleryAppName - +Get-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -name $galleryAppName .Example -PS C:\> Get-AzGalleryApplication -GalleryName $GalleryName -ResourceGroupName $rgName - +Get-AzGalleryApplication -GalleryName $GalleryName -ResourceGroupName $rgName .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication .Notes COMPLEX PARAMETER PROPERTIES @@ -240,7 +272,7 @@ INPUTOBJECT : Identity Parameter https://docs.microsoft.com/powershell/module/az.compute/get-azgalleryapplication #> function Get-AzGalleryApplication { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -335,6 +367,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.Compute.private\Get-AzGalleryApplication_Get'; GetViaIdentity = 'Az.Compute.private\Get-AzGalleryApplication_GetViaIdentity'; @@ -350,6 +400,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -358,17 +409,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -377,19 +445,9 @@ Gets specific run command for a subscription in a location. .Description Gets specific run command for a subscription in a location. .Example -PS C:\> Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand2" - -Location Name Type --------- ---- ---- -eastus firstruncommand2 Microsoft.Compute/virtualMachines/runCommands +Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand2" .Example -PS C:\> Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname - -Location Name Type --------- ---- ---- -eastus firstruncommand Microsoft.Compute/virtualMachines/runCommands -eastus firstruncommand2 Microsoft.Compute/virtualMachines/runCommands -eastus firstruncommand3 Microsoft.Compute/virtualMachines/runCommands +Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity @@ -539,6 +597,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.Compute.private\Get-AzVMRunCommand_Get'; Get1 = 'Az.Compute.private\Get-AzVMRunCommand_Get1'; @@ -556,6 +632,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -564,17 +641,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -583,17 +677,9 @@ The operation to get the VMSS VM run command. .Description The operation to get the VMSS VM run command. .Example -PS C:\> Get-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname - -Location Name Type --------- ---- ---- -eastus first Microsoft.Compute/virtualMachineScaleSets/virtualMachines/runCommands +Get-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname .Example -PS C:\> Get-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -VMScaleSetName $vmssname - -Location Name Type --------- ---- ---- -eastus first Microsoft.Compute/virtualMachineScaleSets/virtualMachines/runCommands +Get-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -VMScaleSetName $vmssname .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity @@ -730,6 +816,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.Compute.private\Get-AzVmssVMRunCommand_Get'; GetViaIdentity = 'Az.Compute.private\Get-AzVmssVMRunCommand_GetViaIdentity'; @@ -745,6 +849,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -753,17 +858,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -772,8 +894,7 @@ Delete a gallery Application Version. .Description Delete a gallery Application Version. .Example -PS C:\> Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -Name $name - +Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -Name $name .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity @@ -919,6 +1040,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.Compute.private\Remove-AzGalleryApplicationVersion_Delete'; DeleteViaIdentity = 'Az.Compute.private\Remove-AzGalleryApplicationVersion_DeleteViaIdentity'; @@ -933,6 +1072,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -941,17 +1081,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -960,8 +1117,7 @@ Delete a gallery Application. .Description Delete a gallery Application. .Example -PS C:\> Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -Name $name - +Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -Name $name .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity @@ -1101,6 +1257,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.Compute.private\Remove-AzGalleryApplication_Delete'; DeleteViaIdentity = 'Az.Compute.private\Remove-AzGalleryApplication_DeleteViaIdentity'; @@ -1115,6 +1289,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -1123,17 +1298,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -1142,8 +1334,7 @@ The operation to delete the run command. .Description The operation to delete the run command. .Example -PS C:\> Remove-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand" - +Remove-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand" .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity @@ -1282,6 +1473,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.Compute.private\Remove-AzVMRunCommand_Delete'; DeleteViaIdentity = 'Az.Compute.private\Remove-AzVMRunCommand_DeleteViaIdentity'; @@ -1296,6 +1505,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -1304,17 +1514,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -1323,8 +1550,7 @@ The operation to delete the VMSS VM run command. .Description The operation to delete the VMSS VM run command. .Example -PS C:\> Remove-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname - +Remove-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity @@ -1469,6 +1695,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.Compute.private\Remove-AzVmssVMRunCommand_Delete'; DeleteViaIdentity = 'Az.Compute.private\Remove-AzVmssVMRunCommand_DeleteViaIdentity'; @@ -1483,6 +1727,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -1491,17 +1736,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -1510,11 +1772,7 @@ The operation to create or update the run command. .Description The operation to create or update the run command. .Example -PS C:\> Set-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName 'firstruncommand' - -Location Name Type --------- ---- ---- -eastus firstruncommand2 Microsoft.Compute/virtualMachines/runCommands +Set-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName 'firstruncommand' .Outputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand @@ -1714,6 +1972,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ UpdateExpanded = 'Az.Compute.private\Set-AzVMRunCommand_UpdateExpanded'; } @@ -1727,6 +2003,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -1735,17 +2012,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -1754,11 +2048,7 @@ The operation to create or update the VMSS VM run command. .Description The operation to create or update the VMSS VM run command. .Example -PS C:\> Set-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname - -Location Name Type --------- ---- ---- -eastus first Microsoft.Compute/virtualMachineScaleSets/virtualMachines/runCommands +Set-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname .Outputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand @@ -1964,6 +2254,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ UpdateExpanded = 'Az.Compute.private\Set-AzVmssVMRunCommand_UpdateExpanded'; } @@ -1977,6 +2285,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -1985,17 +2294,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -2004,13 +2330,12 @@ Update a gallery Application Definition. .Description Update a gallery Application Definition. .Example -PS C:\> Update-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -Name $name -Description "New Description" - +Update-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -Name $name -Description "New Description" .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication .Notes COMPLEX PARAMETER PROPERTIES @@ -2035,7 +2360,7 @@ INPUTOBJECT : Identity Parameter https://docs.microsoft.com/powershell/module/az.compute/update-azgalleryapplication #> function Update-AzGalleryApplication { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -2083,7 +2408,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, @@ -2155,6 +2480,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ UpdateExpanded = 'Az.Compute.private\Update-AzGalleryApplication_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.Compute.private\Update-AzGalleryApplication_UpdateViaIdentityExpanded'; @@ -2169,6 +2512,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -2177,17 +2521,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -2196,16 +2557,15 @@ Create or update a gallery Application Definition. .Description Create or update a gallery Application Definition. .Example -PS C:\> New-AzGalleryApplication -ResourceGroupName $rgName -Location EastUS -GalleryName $galleryName -Name $name -SupportedOSType Windows - +New-AzGalleryApplication -ResourceGroupName $rgName -Location EastUS -GalleryName $galleryName -Name $name -SupportedOSType Windows .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication .Link https://docs.microsoft.com/powershell/module/az.compute/new-azgalleryapplication #> function New-AzGalleryApplication { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication])] [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -2338,6 +2698,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ __AllParameterSets = 'Az.Compute.custom\New-AzGalleryApplication'; } @@ -2351,6 +2729,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -2359,17 +2738,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -2378,17 +2774,16 @@ Create or update a gallery Application Version. .Description Create or update a gallery Application Version. .Example -PS C:\> $ctx = New-AzStorageContext -StorageAccountName $storAccName -PS C:\> $SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r -PS C:\> $storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName -PS C:\> $blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context -PS C:\> $SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context -PS C:\> $SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken -PS C:\> New-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -Install "powershell -command 'Expand-Archive -Path package.zip -DestinationPath C:\\package\'" -Remove "del C:\\package" - +$ctx = New-AzStorageContext -StorageAccountName $storAccName +$SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r +$storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName +$blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context +$SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context +$SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken +New-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -Install "powershell -command 'Expand-Archive -Path package.zip -DestinationPath C:\\package\'" -Remove "del C:\\package" .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion .Notes COMPLEX PARAMETER PROPERTIES @@ -2401,12 +2796,14 @@ TARGETREGION : The target regions where the Image Version is go [DiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. [OSDiskImageDiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. [RegionalReplicaCount ]: The number of replicas of the Image Version to be created per region. This property is updatable. + [SecurityProfileConfidentialVMEncryptionType ]: confidential VM encryption types + [SecurityProfileSecureVMDiskEncryptionSetId ]: secure VM disk encryption set id [StorageAccountType ]: Specifies the storage account type to be used to store the image. This property is not updatable. .Link https://docs.microsoft.com/powershell/module/az.compute/new-azgalleryapplicationversion #> function New-AzGalleryApplicationVersion { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -2513,7 +2910,7 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]] # The target regions where the Image Version is going to be replicated to. # This property is updatable. # To construct, see NOTES section for TARGETREGION properties and create a hash table. @@ -2528,6 +2925,24 @@ param( # This is limited to 4096 characters. ${Update}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.String] + # Optional. + # The name to assign the downloaded package file on the VM. + # This is limited to 4096 characters. + # If not specified, the package file will be named the same as the Gallery Application name. + ${PackageFileName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.String] + # Optional. + # The name to assign the downloaded config file on the VM. + # This is limited to 4096 characters. + # If not specified, the config file will be named the Gallery Application name appended with "_config". + ${ConfigFileName}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2595,6 +3010,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ CreateExpanded = 'Az.Compute.custom\New-AzGalleryApplicationVersion'; } @@ -2608,6 +3041,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -2616,17 +3050,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -2635,18 +3086,18 @@ Update a gallery Application Version. .Description Update a gallery Application Version. .Example -PS C:\> $ctx = New-AzStorageContext -StorageAccountName $storAccName -PS C:\> $SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r -PS C:\> $storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName -PS C:\> $blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context -PS C:\> $SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context -PS C:\> $SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken -PS C:\> Update-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -ReplicaCount 3 +$ctx = New-AzStorageContext -StorageAccountName $storAccName +$SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r +$storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName +$blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context +$SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context +$SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken +Update-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -ReplicaCount 3 .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion .Notes COMPLEX PARAMETER PROPERTIES @@ -2675,12 +3126,14 @@ TARGETREGION : The target regions where the Image Version is go [DiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. [OSDiskImageDiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. [RegionalReplicaCount ]: The number of replicas of the Image Version to be created per region. This property is updatable. + [SecurityProfileConfidentialVMEncryptionType ]: confidential VM encryption types + [SecurityProfileSecureVMDiskEncryptionSetId ]: secure VM disk encryption set id [StorageAccountType ]: Specifies the storage account type to be used to store the image. This property is not updatable. .Link https://docs.microsoft.com/powershell/module/az.compute/update-azgalleryapplicationversion #> function Update-AzGalleryApplicationVersion { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -2764,7 +3217,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, @@ -2772,7 +3225,7 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]] # The target regions where the Image Version is going to be replicated to. # This property is updatable. # To construct, see NOTES section for TARGETREGION properties and create a hash table. @@ -2845,6 +3298,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ UpdateExpanded = 'Az.Compute.custom\Update-AzGalleryApplicationVersion'; UpdateViaIdentityExpanded = 'Az.Compute.custom\Update-AzGalleryApplicationVersion'; @@ -2859,6 +3330,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -2867,15 +3339,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplication.ps1 b/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplication.ps1 index 768916ce48c8..01247746c775 100644 --- a/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplication.ps1 +++ b/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplication.ps1 @@ -20,8 +20,7 @@ Delete a gallery Application. .Description Delete a gallery Application. .Example -PS C:\> Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -Name $name - +Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -Name $name .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity @@ -161,6 +160,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.Compute.private\Remove-AzGalleryApplication_Delete'; DeleteViaIdentity = 'Az.Compute.private\Remove-AzGalleryApplication_DeleteViaIdentity'; @@ -175,6 +192,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -183,15 +201,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplicationVersion.ps1 b/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplicationVersion.ps1 index 5aaf0235cb30..e43213f38ef5 100644 --- a/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplicationVersion.ps1 +++ b/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplicationVersion.ps1 @@ -20,8 +20,7 @@ Delete a gallery Application Version. .Description Delete a gallery Application Version. .Example -PS C:\> Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -Name $name - +Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -Name $name .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity @@ -167,6 +166,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.Compute.private\Remove-AzGalleryApplicationVersion_Delete'; DeleteViaIdentity = 'Az.Compute.private\Remove-AzGalleryApplicationVersion_DeleteViaIdentity'; @@ -181,6 +198,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -189,15 +207,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/Compute/Compute.Autorest/exports/Remove-AzVMRunCommand.ps1 b/src/Compute/Compute.Autorest/exports/Remove-AzVMRunCommand.ps1 index 22a2ba172d7a..1f6495959936 100644 --- a/src/Compute/Compute.Autorest/exports/Remove-AzVMRunCommand.ps1 +++ b/src/Compute/Compute.Autorest/exports/Remove-AzVMRunCommand.ps1 @@ -20,8 +20,7 @@ The operation to delete the run command. .Description The operation to delete the run command. .Example -PS C:\> Remove-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand" - +Remove-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand" .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity @@ -160,6 +159,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.Compute.private\Remove-AzVMRunCommand_Delete'; DeleteViaIdentity = 'Az.Compute.private\Remove-AzVMRunCommand_DeleteViaIdentity'; @@ -174,6 +191,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -182,15 +200,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/Compute/Compute.Autorest/exports/Remove-AzVmssVMRunCommand.ps1 b/src/Compute/Compute.Autorest/exports/Remove-AzVmssVMRunCommand.ps1 index 4d140bdf8845..85e79f550a89 100644 --- a/src/Compute/Compute.Autorest/exports/Remove-AzVmssVMRunCommand.ps1 +++ b/src/Compute/Compute.Autorest/exports/Remove-AzVmssVMRunCommand.ps1 @@ -20,8 +20,7 @@ The operation to delete the VMSS VM run command. .Description The operation to delete the VMSS VM run command. .Example -PS C:\> Remove-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname - +Remove-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity @@ -166,6 +165,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.Compute.private\Remove-AzVmssVMRunCommand_Delete'; DeleteViaIdentity = 'Az.Compute.private\Remove-AzVmssVMRunCommand_DeleteViaIdentity'; @@ -180,6 +197,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -188,15 +206,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/Compute/Compute.Autorest/exports/Set-AzVMRunCommand.ps1 b/src/Compute/Compute.Autorest/exports/Set-AzVMRunCommand.ps1 index 21b40da4c43f..7dc4a846017d 100644 --- a/src/Compute/Compute.Autorest/exports/Set-AzVMRunCommand.ps1 +++ b/src/Compute/Compute.Autorest/exports/Set-AzVMRunCommand.ps1 @@ -20,11 +20,7 @@ The operation to create or update the run command. .Description The operation to create or update the run command. .Example -PS C:\> Set-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName 'firstruncommand' - -Location Name Type --------- ---- ---- -eastus firstruncommand2 Microsoft.Compute/virtualMachines/runCommands +Set-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName 'firstruncommand' .Outputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand @@ -224,6 +220,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ UpdateExpanded = 'Az.Compute.private\Set-AzVMRunCommand_UpdateExpanded'; } @@ -237,6 +251,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -245,15 +260,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/Compute/Compute.Autorest/exports/Set-AzVmssVMRunCommand.ps1 b/src/Compute/Compute.Autorest/exports/Set-AzVmssVMRunCommand.ps1 index b1e3429508b7..18e8e538e9fc 100644 --- a/src/Compute/Compute.Autorest/exports/Set-AzVmssVMRunCommand.ps1 +++ b/src/Compute/Compute.Autorest/exports/Set-AzVmssVMRunCommand.ps1 @@ -20,11 +20,7 @@ The operation to create or update the VMSS VM run command. .Description The operation to create or update the VMSS VM run command. .Example -PS C:\> Set-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname - -Location Name Type --------- ---- ---- -eastus first Microsoft.Compute/virtualMachineScaleSets/virtualMachines/runCommands +Set-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname .Outputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand @@ -230,6 +226,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ UpdateExpanded = 'Az.Compute.private\Set-AzVmssVMRunCommand_UpdateExpanded'; } @@ -243,6 +257,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -251,15 +266,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplication.ps1 b/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplication.ps1 index 7554f9c97160..9a06f5e6e8ae 100644 --- a/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplication.ps1 +++ b/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplication.ps1 @@ -20,13 +20,12 @@ Update a gallery Application Definition. .Description Update a gallery Application Definition. .Example -PS C:\> Update-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -Name $name -Description "New Description" - +Update-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -Name $name -Description "New Description" .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication .Notes COMPLEX PARAMETER PROPERTIES @@ -51,7 +50,7 @@ INPUTOBJECT : Identity Parameter https://docs.microsoft.com/powershell/module/az.compute/update-azgalleryapplication #> function Update-AzGalleryApplication { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -99,7 +98,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, @@ -171,6 +170,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ UpdateExpanded = 'Az.Compute.private\Update-AzGalleryApplication_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.Compute.private\Update-AzGalleryApplication_UpdateViaIdentityExpanded'; @@ -185,6 +202,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -193,15 +211,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplicationVersion.ps1 b/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplicationVersion.ps1 index 63ef54635a9f..21201382ffd4 100644 --- a/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplicationVersion.ps1 +++ b/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplicationVersion.ps1 @@ -20,18 +20,18 @@ Update a gallery Application Version. .Description Update a gallery Application Version. .Example -PS C:\> $ctx = New-AzStorageContext -StorageAccountName $storAccName -PS C:\> $SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r -PS C:\> $storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName -PS C:\> $blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context -PS C:\> $SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context -PS C:\> $SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken -PS C:\> Update-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -ReplicaCount 3 +$ctx = New-AzStorageContext -StorageAccountName $storAccName +$SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r +$storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName +$blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context +$SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context +$SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken +Update-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -ReplicaCount 3 .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion .Notes COMPLEX PARAMETER PROPERTIES @@ -60,12 +60,14 @@ TARGETREGION : The target regions where the Image Version is go [DiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. [OSDiskImageDiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. [RegionalReplicaCount ]: The number of replicas of the Image Version to be created per region. This property is updatable. + [SecurityProfileConfidentialVMEncryptionType ]: confidential VM encryption types + [SecurityProfileSecureVMDiskEncryptionSetId ]: secure VM disk encryption set id [StorageAccountType ]: Specifies the storage account type to be used to store the image. This property is not updatable. .Link https://docs.microsoft.com/powershell/module/az.compute/update-azgalleryapplicationversion #> function Update-AzGalleryApplicationVersion { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -149,7 +151,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, @@ -157,7 +159,7 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]] # The target regions where the Image Version is going to be replicated to. # This property is updatable. # To construct, see NOTES section for TARGETREGION properties and create a hash table. @@ -230,6 +232,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ UpdateExpanded = 'Az.Compute.custom\Update-AzGalleryApplicationVersion'; UpdateViaIdentityExpanded = 'Az.Compute.custom\Update-AzGalleryApplicationVersion'; @@ -244,6 +264,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -252,15 +273,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/Compute/Compute.Autorest/generate-info.json b/src/Compute/Compute.Autorest/generate-info.json new file mode 100644 index 000000000000..ff41c8ee67f6 --- /dev/null +++ b/src/Compute/Compute.Autorest/generate-info.json @@ -0,0 +1,8 @@ +{ + "swagger_commit": "fc2245b8f0fe6f17628e3b5a306b4b150c73cff0", + "autorest": "`-- (empty)", + "node": "v14.15.5", + "autorest_powershell": "3.0.491", + "autorest_core": "3.8.4", + "autorest_modelerfour": "4.15.414" +} diff --git a/src/Compute/Compute.Autorest/generated/Module.cs b/src/Compute/Compute.Autorest/generated/Module.cs index 61dc9f59d2e9..0ceba6e9bb36 100644 --- a/src/Compute/Compute.Autorest/generated/Module.cs +++ b/src/Compute/Compute.Autorest/generated/Module.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute using GetParameterDelegate = global::System.Func; using ModuleLoadPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>; using ArgumentCompleterDelegate = global::System.Func; + using GetTelemetryIdDelegate = global::System.Func; + using TelemetryDelegate = global::System.Action; using NewRequestPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>; using SignalDelegate = global::System.Func, global::System.Threading.Tasks.Task>; using EventListenerDelegate = global::System.Func, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Management.Automation.InvocationInfo, string, string, string, global::System.Exception, global::System.Threading.Tasks.Task>; @@ -30,6 +32,8 @@ public partial class Module /// the ISendAsync pipeline instance (when proxy is enabled) private Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.HttpPipeline _pipelineWithProxy; + public bool _useProxy = false; + public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy(); /// Gets completion data for azure specific fields @@ -44,6 +48,9 @@ public partial class Module /// The delegate to call to get parameter data from a common module. public GetParameterDelegate GetParameterValue { get; set; } + /// The delegate to get the telemetry Id. + public GetTelemetryIdDelegate GetTelemetryId { get; set; } + /// Backing field for property. private static Microsoft.Azure.PowerShell.Cmdlets.Compute.Module _instance; @@ -65,6 +72,9 @@ public partial class Module /// The ResourceID for this module (azure arm). public string ResourceId => @"Az.Compute"; + /// The delegate for creating a telemetry. + public TelemetryDelegate Telemetry { get; set; } + /// The from the cmdlet /// The HttpPipeline for the request @@ -88,7 +98,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.HttpPipeline CreatePip { Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.HttpPipeline pipeline = null; BeforeCreatePipeline(invocationInfo, ref pipeline); - pipeline = (pipeline ?? (_handler.UseProxy ? _pipelineWithProxy : _pipeline)).Clone(); + pipeline = (pipeline ?? (_useProxy ? _pipelineWithProxy : _pipeline)).Clone(); AfterCreatePipeline(invocationInfo, ref pipeline); pipeline.Append(new Runtime.CmdInfoHandler(processRecordId, invocationInfo, parameterSetName).SendAsync); OnNewRequest?.Invoke( invocationInfo, correlationId,processRecordId, (step)=> { pipeline.Prepend(step); } , (step)=> { pipeline.Append(step); } ); @@ -115,7 +125,7 @@ public void Init() /// Creates the module instance. private Module() { - /// constructor + // constructor ClientAPI = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Compute(); _handler.Proxy = _webProxy; _pipeline = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient())); @@ -127,12 +137,24 @@ private Module() /// True if the proxy should use default credentials public void SetProxyConfiguration(global::System.Uri proxy, global::System.Management.Automation.PSCredential proxyCredential, bool proxyUseDefaultCredentials) { + _useProxy = proxy != null; + if (proxy == null) + { + return; + } // set the proxy configuration _webProxy.Address = proxy; _webProxy.BypassProxyOnLocal = false; - _webProxy.Credentials = proxyCredential ?.GetNetworkCredential(); - _webProxy.UseDefaultCredentials = proxyUseDefaultCredentials; - _handler.UseProxy = proxy != null; + if (proxyUseDefaultCredentials) + { + _webProxy.Credentials = null; + _webProxy.UseDefaultCredentials = true; + } + else + { + _webProxy.UseDefaultCredentials = false; + _webProxy.Credentials = proxyCredential ?.GetNetworkCredential(); + } } /// Called to dispatch events to the common module listener diff --git a/src/Compute/Compute.Autorest/generated/api/Compute.cs b/src/Compute/Compute.Autorest/generated/api/Compute.cs index 6fcf9563bd70..f73af44e4b01 100644 --- a/src/Compute/Compute.Autorest/generated/api/Compute.cs +++ b/src/Compute/Compute.Autorest/generated/api/Compute.cs @@ -29,9 +29,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -75,15 +75,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'"); @@ -132,7 +132,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleriesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleriesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -238,6 +238,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -248,7 +249,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Gallery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Gallery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -283,7 +284,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleriesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleriesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -311,7 +312,7 @@ public partial class Compute /// public async global::System.Threading.Tasks.Task GalleriesDelete(string subscriptionId, string resourceGroupName, string galleryName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -353,13 +354,13 @@ public partial class Compute /// public async global::System.Threading.Tasks.Task GalleriesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'"); @@ -512,6 +513,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -577,6 +579,7 @@ public partial class Compute /// The name of the resource group. /// The name of the Shared Image Gallery. /// The select expression to apply on the operation. + /// The expand query option to apply on the operation. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -585,9 +588,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesGet(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SelectPermissions? Select, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesGet(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SelectPermissions? Select, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExpandParams? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -603,6 +606,8 @@ public partial class Compute + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + "&" + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) + + "&" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -621,6 +626,7 @@ public partial class Compute /// Retrieves information about a Shared Image Gallery. /// /// The select expression to apply on the operation. + /// The expand query option to apply on the operation. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -629,15 +635,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesGetViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SelectPermissions? Select, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesGetViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SelectPermissions? Select, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExpandParams? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'"); @@ -659,6 +665,8 @@ public partial class Compute + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + "&" + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) + + "&" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -684,7 +692,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleriesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleriesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -702,7 +710,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Gallery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Gallery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -732,11 +740,12 @@ public partial class Compute /// The name of the resource group. /// The name of the Shared Image Gallery. /// The select expression to apply on the operation. + /// The expand query option to apply on the operation. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleriesGet_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SelectPermissions? Select, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleriesGet_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SelectPermissions? Select, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExpandParams? Expand, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -745,6 +754,8 @@ public partial class Compute await eventListener.AssertNotNull(nameof(galleryName),galleryName); await eventListener.AssertNotNull(nameof(Select),Select); await eventListener.AssertEnum(nameof(Select),Select,@"Permissions"); + await eventListener.AssertNotNull(nameof(Expand),Expand); + await eventListener.AssertEnum(nameof(Expand),Expand,@"SharingProfile/Groups"); } } @@ -759,9 +770,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -799,9 +810,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -839,15 +850,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries'"); @@ -890,7 +901,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleriesListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleriesListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -908,7 +919,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -959,15 +970,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Compute/galleries$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Compute/galleries$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries'"); @@ -1007,7 +1018,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleriesList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleriesList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1025,7 +1036,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -1079,9 +1090,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesUpdate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesUpdate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1125,15 +1136,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'"); @@ -1182,7 +1193,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleriesUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleriesUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1288,6 +1299,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -1298,7 +1310,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Gallery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Gallery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -1333,7 +1345,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleriesUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleriesUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1364,9 +1376,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationVersionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationVersionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1414,15 +1426,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationVersionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationVersionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}'"); @@ -1479,7 +1491,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1585,6 +1597,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -1595,7 +1608,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -1634,7 +1647,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1666,7 +1679,7 @@ public partial class Compute /// public async global::System.Threading.Tasks.Task GalleryApplicationVersionsDelete(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1712,13 +1725,13 @@ public partial class Compute /// public async global::System.Threading.Tasks.Task GalleryApplicationVersionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}'"); @@ -1877,6 +1890,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -1956,9 +1970,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationVersionsGet(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationVersionsGet(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2004,15 +2018,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationVersionsGetViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationVersionsGetViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}'"); @@ -2065,7 +2079,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2083,7 +2097,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -2148,9 +2162,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationVersionsListByGalleryApplication(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationVersionsListByGalleryApplication(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2192,15 +2206,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationVersionsListByGalleryApplicationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationVersionsListByGalleryApplicationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions'"); @@ -2251,7 +2265,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsListByGalleryApplication_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsListByGalleryApplication_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2269,7 +2283,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -2334,9 +2348,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationVersionsUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationVersionsUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2384,15 +2398,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationVersionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationVersionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}'"); @@ -2447,7 +2461,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2553,6 +2567,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -2563,7 +2578,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -2602,7 +2617,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2632,9 +2647,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationsCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationsCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2680,15 +2695,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}'"); @@ -2740,7 +2755,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryApplicationsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2846,6 +2861,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -2856,7 +2872,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplication.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplication.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -2892,7 +2908,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryApplicationsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2922,7 +2938,7 @@ public partial class Compute /// public async global::System.Threading.Tasks.Task GalleryApplicationsDelete(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2966,13 +2982,13 @@ public partial class Compute /// public async global::System.Threading.Tasks.Task GalleryApplicationsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}'"); @@ -3128,6 +3144,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -3204,9 +3221,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationsGet(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationsGet(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3247,15 +3264,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}'"); @@ -3303,7 +3320,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryApplicationsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3321,7 +3338,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplication.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplication.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -3380,9 +3397,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationsListByGallery(string subscriptionId, string resourceGroupName, string galleryName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationsListByGallery(string subscriptionId, string resourceGroupName, string galleryName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3422,15 +3439,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationsListByGalleryViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationsListByGalleryViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications'"); @@ -3476,7 +3493,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationsListByGallery_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryApplicationsListByGallery_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3494,7 +3511,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -3553,9 +3570,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationsUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationsUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3601,15 +3618,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}'"); @@ -3661,7 +3678,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryApplicationsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3767,6 +3784,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -3777,7 +3795,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplication.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplication.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -3813,7 +3831,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationsUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryApplicationsUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -3844,9 +3862,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImageVersionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImageVersionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3894,15 +3912,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImageVersionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImageVersionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'"); @@ -3957,7 +3975,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImageVersionsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryImageVersionsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4063,6 +4081,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -4073,7 +4092,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -4111,7 +4130,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImageVersionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryImageVersionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -4143,7 +4162,7 @@ public partial class Compute /// public async global::System.Threading.Tasks.Task GalleryImageVersionsDelete(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4189,13 +4208,13 @@ public partial class Compute /// public async global::System.Threading.Tasks.Task GalleryImageVersionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'"); @@ -4354,6 +4373,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -4433,9 +4453,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImageVersionsGet(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImageVersionsGet(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4481,15 +4501,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImageVersionsGetViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImageVersionsGetViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'"); @@ -4542,7 +4562,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImageVersionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryImageVersionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4560,7 +4580,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -4625,9 +4645,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImageVersionsListByGalleryImage(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImageVersionsListByGalleryImage(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4669,15 +4689,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImageVersionsListByGalleryImageViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImageVersionsListByGalleryImageViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions'"); @@ -4728,7 +4748,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImageVersionsListByGalleryImage_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryImageVersionsListByGalleryImage_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4746,7 +4766,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -4810,9 +4830,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImageVersionsUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImageVersionsUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4860,15 +4880,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImageVersionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImageVersionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'"); @@ -4923,7 +4943,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImageVersionsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryImageVersionsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5029,6 +5049,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -5039,7 +5060,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -5077,7 +5098,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImageVersionsUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryImageVersionsUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -5107,9 +5128,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImagesCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImagesCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5155,15 +5176,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImagesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImagesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'"); @@ -5215,7 +5236,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImagesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryImagesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5321,6 +5342,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -5331,7 +5353,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImage.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImage.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -5367,7 +5389,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImagesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryImagesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -5397,7 +5419,7 @@ public partial class Compute /// public async global::System.Threading.Tasks.Task GalleryImagesDelete(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5441,13 +5463,13 @@ public partial class Compute /// public async global::System.Threading.Tasks.Task GalleryImagesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'"); @@ -5603,6 +5625,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -5678,9 +5701,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImagesGet(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImagesGet(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5721,15 +5744,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImagesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImagesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'"); @@ -5777,7 +5800,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImagesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryImagesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5795,7 +5818,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImage.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImage.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -5853,9 +5876,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImagesListByGallery(string subscriptionId, string resourceGroupName, string galleryName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImagesListByGallery(string subscriptionId, string resourceGroupName, string galleryName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5895,15 +5918,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImagesListByGalleryViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImagesListByGalleryViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images'"); @@ -5949,7 +5972,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImagesListByGallery_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryImagesListByGallery_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5967,7 +5990,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -6026,9 +6049,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImagesUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImagesUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6074,15 +6097,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImagesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImagesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'"); @@ -6134,7 +6157,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImagesUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryImagesUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6240,6 +6263,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -6250,7 +6274,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImage.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImage.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -6286,7 +6310,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImagesUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryImagesUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -6313,9 +6337,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GallerySharingProfileUpdate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GallerySharingProfileUpdate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6360,15 +6384,15 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GallerySharingProfileUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GallerySharingProfileUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2021-07-01"; + var apiVersion = @"2022-01-03"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/share$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/share$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/share'"); @@ -6418,7 +6442,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GallerySharingProfileUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GallerySharingProfileUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6525,6 +6549,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -6535,7 +6560,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingUpdate.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingUpdate.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -6569,7 +6594,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GallerySharingProfileUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GallerySharingProfileUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -6652,7 +6677,7 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachines/(?[^/]+)/runCommands/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachines/(?[^/]+)/runCommands/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}'"); @@ -6812,6 +6837,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -6937,7 +6963,7 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachines/(?[^/]+)/runCommands/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachines/(?[^/]+)/runCommands/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}'"); @@ -7093,6 +7119,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -7265,7 +7292,7 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachines/(?[^/]+)/runCommands/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachines/(?[^/]+)/runCommands/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}'"); @@ -7398,7 +7425,7 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Compute/locations/(?[^/]+)/runCommands/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Compute/locations/(?[^/]+)/runCommands/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}'"); @@ -7608,7 +7635,7 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachines/(?[^/]+)/runCommands$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachines/(?[^/]+)/runCommands$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands'"); @@ -7737,7 +7764,7 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Compute/locations/(?[^/]+)/runCommands$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Compute/locations/(?[^/]+)/runCommands$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands'"); @@ -7907,7 +7934,7 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachines/(?[^/]+)/runCommands/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachines/(?[^/]+)/runCommands/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}'"); @@ -8065,6 +8092,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -8197,7 +8225,7 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?[^/]+)/virtualMachines/(?[^/]+)/runCommands/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?[^/]+)/virtualMachines/(?[^/]+)/runCommands/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}'"); @@ -8360,6 +8388,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -8490,7 +8519,7 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?[^/]+)/virtualMachines/(?[^/]+)/runCommands/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?[^/]+)/virtualMachines/(?[^/]+)/runCommands/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}'"); @@ -8651,6 +8680,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -8786,7 +8816,7 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?[^/]+)/virtualMachines/(?[^/]+)/runCommands/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?[^/]+)/virtualMachines/(?[^/]+)/runCommands/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}'"); @@ -8982,7 +9012,7 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?[^/]+)/virtualMachines/(?[^/]+)/runCommands$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?[^/]+)/virtualMachines/(?[^/]+)/runCommands$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands'"); @@ -9174,7 +9204,7 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?[^/]+)/virtualMachines/(?[^/]+)/runCommands/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?[^/]+)/virtualMachines/(?[^/]+)/runCommands/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}'"); @@ -9337,6 +9367,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } } @@ -9465,7 +9496,7 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?[^/]+)/virtualmachines/(?[^/]+)/runCommand$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?[^/]+)/virtualmachines/(?[^/]+)/runCommand$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand'"); @@ -9621,6 +9652,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -9741,7 +9773,7 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachines/(?[^/]+)/runCommand$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/virtualMachines/(?[^/]+)/runCommand$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand'"); @@ -9894,6 +9926,7 @@ public partial class Compute // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } var _contentType = _response.Content.Headers.ContentType?.MediaType; diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/OSDiskImageEncryption.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Any.PowerShell.cs similarity index 68% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/OSDiskImageEncryption.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Any.PowerShell.cs index 21970f340660..72d83ec36d00 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/OSDiskImageEncryption.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Any.PowerShell.cs @@ -3,13 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - /// Contains encryption settings for an OS disk image. - [System.ComponentModel.TypeConverter(typeof(OSDiskImageEncryptionTypeConverter))] - public partial class OSDiskImageEncryption + /// Any object + [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] + public partial class Any { /// @@ -31,7 +31,8 @@ public partial class OSDiskImageEncryption /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class OSDiskImageEncryption /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,44 +55,11 @@ public partial class OSDiskImageEncryption partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IOSDiskImageEncryption DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new OSDiskImageEncryption(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IOSDiskImageEncryption DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new OSDiskImageEncryption(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IOSDiskImageEncryption FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal OSDiskImageEncryption(global::System.Collections.IDictionary content) + internal Any(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -99,16 +68,15 @@ internal OSDiskImageEncryption(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal OSDiskImageEncryption(global::System.Management.Automation.PSObject content) + internal Any(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -117,18 +85,50 @@ internal OSDiskImageEncryption(global::System.Management.Automation.PSObject con return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); AfterDeserializePSObject(content); } + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Any(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Any(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// Serializes this instance to a json string. /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); } - /// Contains encryption settings for an OS disk image. - [System.ComponentModel.TypeConverter(typeof(OSDiskImageEncryptionTypeConverter))] - public partial interface IOSDiskImageEncryption + /// Any object + [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] + public partial interface IAny { diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Any.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Any.TypeConverter.cs new file mode 100644 index 000000000000..e825e4958fc9 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Any.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AnyTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Any.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Any.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Any.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Any.cs b/src/Compute/Compute.Autorest/generated/api/Models/Any.cs new file mode 100644 index 000000000000..c4de8f181de6 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Any.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Any object + public partial class Any : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAnyInternal + { + + /// Creates an new instance. + public Any() + { + + } + } + /// Any object + public partial interface IAny : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + + } + /// Any object + internal partial interface IAnyInternal + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Any.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Any.json.cs new file mode 100644 index 000000000000..e59ca387bac9 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Any.json.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Any object + public partial class Any + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal Any(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new Any(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiError.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiError.PowerShell.cs index 12f212c9363b..71b73d2f1e69 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiError.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiError.PowerShell.cs @@ -31,7 +31,8 @@ public partial class ApiError /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class ApiError /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -66,13 +68,34 @@ internal ApiError(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InnerErrorTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBase[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiErrorBaseTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).InnererrorExceptiontype = (string) content.GetValueForProperty("InnererrorExceptiontype",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).InnererrorExceptiontype, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).InnererrorErrordetail = (string) content.GetValueForProperty("InnererrorErrordetail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).InnererrorErrordetail, global::System.Convert.ToString); + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InnerErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBase[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiErrorBaseTypeConverter.ConvertFrom)); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("InnererrorExceptiontype")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).InnererrorExceptiontype = (string) content.GetValueForProperty("InnererrorExceptiontype",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).InnererrorExceptiontype, global::System.Convert.ToString); + } + if (content.Contains("InnererrorErrordetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).InnererrorErrordetail = (string) content.GetValueForProperty("InnererrorErrordetail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).InnererrorErrordetail, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -90,13 +113,34 @@ internal ApiError(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InnerErrorTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBase[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiErrorBaseTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).InnererrorExceptiontype = (string) content.GetValueForProperty("InnererrorExceptiontype",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).InnererrorExceptiontype, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).InnererrorErrordetail = (string) content.GetValueForProperty("InnererrorErrordetail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).InnererrorErrordetail, global::System.Convert.ToString); + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InnerErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBase[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiErrorBaseTypeConverter.ConvertFrom)); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("InnererrorExceptiontype")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).InnererrorExceptiontype = (string) content.GetValueForProperty("InnererrorExceptiontype",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).InnererrorExceptiontype, global::System.Convert.ToString); + } + if (content.Contains("InnererrorErrordetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).InnererrorErrordetail = (string) content.GetValueForProperty("InnererrorErrordetail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorInternal)this).InnererrorErrordetail, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } @@ -130,7 +174,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApi /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiError.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiError.TypeConverter.cs index f504008ed4ca..4da411dadec9 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiError.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiError.TypeConverter.cs @@ -14,20 +14,19 @@ public partial class ApiErrorTypeConverter : global::System.Management.Automatio { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +99,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiError.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiError.json.cs index 896052ef04ae..280c1518f5a4 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiError.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiError.json.cs @@ -20,7 +20,7 @@ public partial class ApiError partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ApiError /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class ApiError /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiErrorBase.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiErrorBase.PowerShell.cs index a0c1dc3be5a1..5e4b2bb6cd47 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiErrorBase.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiErrorBase.PowerShell.cs @@ -31,7 +31,8 @@ public partial class ApiErrorBase /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class ApiErrorBase /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -66,9 +68,18 @@ internal ApiErrorBase(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Message, global::System.Convert.ToString); + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Message, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -86,9 +97,18 @@ internal ApiErrorBase(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Message, global::System.Convert.ToString); + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBaseInternal)this).Message, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } @@ -122,7 +142,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApi /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBase FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiErrorBase.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiErrorBase.TypeConverter.cs index 2043afc841ba..dd40da67f4b1 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiErrorBase.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiErrorBase.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class ApiErrorBaseTypeConverter : global::System.Management.Autom { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiErrorBase.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiErrorBase.json.cs index 2a2f9c973967..4c486bbe7b34 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiErrorBase.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ApiErrorBase.json.cs @@ -20,7 +20,7 @@ public partial class ApiErrorBase partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ApiErrorBase /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class ApiErrorBase /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/CloudError.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/CloudError.PowerShell.cs index ebbe019636e6..faf83fd482d3 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/CloudError.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/CloudError.PowerShell.cs @@ -31,7 +31,8 @@ public partial class CloudError /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class CloudError /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -66,14 +68,38 @@ internal CloudError(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiErrorTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InnerErrorTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBase[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiErrorBaseTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).InnererrorExceptiontype = (string) content.GetValueForProperty("InnererrorExceptiontype",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).InnererrorExceptiontype, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).InnererrorErrordetail = (string) content.GetValueForProperty("InnererrorErrordetail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).InnererrorErrordetail, global::System.Convert.ToString); + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InnerErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBase[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiErrorBaseTypeConverter.ConvertFrom)); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("InnererrorExceptiontype")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).InnererrorExceptiontype = (string) content.GetValueForProperty("InnererrorExceptiontype",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).InnererrorExceptiontype, global::System.Convert.ToString); + } + if (content.Contains("InnererrorErrordetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).InnererrorErrordetail = (string) content.GetValueForProperty("InnererrorErrordetail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).InnererrorErrordetail, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -91,14 +117,38 @@ internal CloudError(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiErrorTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InnerErrorTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBase[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiErrorBaseTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).InnererrorExceptiontype = (string) content.GetValueForProperty("InnererrorExceptiontype",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).InnererrorExceptiontype, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).InnererrorErrordetail = (string) content.GetValueForProperty("InnererrorErrordetail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).InnererrorErrordetail, global::System.Convert.ToString); + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InnerErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IApiErrorBase[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ApiErrorBaseTypeConverter.ConvertFrom)); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("InnererrorExceptiontype")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).InnererrorExceptiontype = (string) content.GetValueForProperty("InnererrorExceptiontype",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).InnererrorExceptiontype, global::System.Convert.ToString); + } + if (content.Contains("InnererrorErrordetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).InnererrorErrordetail = (string) content.GetValueForProperty("InnererrorErrordetail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudErrorInternal)this).InnererrorErrordetail, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } @@ -132,7 +182,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IClo /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/CloudError.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/CloudError.TypeConverter.cs index 04c385071fda..6123a388d15f 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/CloudError.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/CloudError.TypeConverter.cs @@ -14,20 +14,19 @@ public partial class CloudErrorTypeConverter : global::System.Management.Automat { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +99,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/CloudError.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/CloudError.json.cs index ff1ff3c520ef..40e608cd1c38 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/CloudError.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/CloudError.json.cs @@ -20,7 +20,7 @@ public partial class CloudError partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class CloudError /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class CloudError /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/EncryptionImages.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/EncryptionImages.PowerShell.cs deleted file mode 100644 index d4bb8cda490e..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/EncryptionImages.PowerShell.cs +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// - /// Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. - /// - [System.ComponentModel.TypeConverter(typeof(EncryptionImagesTypeConverter))] - public partial class EncryptionImages - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImages DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EncryptionImages(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImages DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EncryptionImages(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EncryptionImages(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal)this).OSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption) content.GetValueForProperty("OSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal)this).OSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DiskImageEncryptionTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal)this).DataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption[]) content.GetValueForProperty("DataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal)this).DataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DataDiskImageEncryptionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal)this).OSDiskImageDiskEncryptionSetId = (string) content.GetValueForProperty("OSDiskImageDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal)this).OSDiskImageDiskEncryptionSetId, global::System.Convert.ToString); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal EncryptionImages(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal)this).OSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption) content.GetValueForProperty("OSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal)this).OSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DiskImageEncryptionTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal)this).DataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption[]) content.GetValueForProperty("DataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal)this).DataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DataDiskImageEncryptionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal)this).OSDiskImageDiskEncryptionSetId = (string) content.GetValueForProperty("OSDiskImageDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal)this).OSDiskImageDiskEncryptionSetId, global::System.Convert.ToString); - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImages FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. - [System.ComponentModel.TypeConverter(typeof(EncryptionImagesTypeConverter))] - public partial interface IEncryptionImages - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/EncryptionImages.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/EncryptionImages.cs deleted file mode 100644 index 8ed2750b1b1f..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/EncryptionImages.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; - - /// - /// Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. - /// - public partial class EncryptionImages : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImages, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal - { - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption[] _dataDiskImage; - - /// A list of encryption specifications for data disk images. - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption[] DataDiskImage { get => this._dataDiskImage; set => this._dataDiskImage = value; } - - /// Internal Acessors for OSDiskImage - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal.OSDiskImage { get => (this._oSDiskImage = this._oSDiskImage ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DiskImageEncryption()); set { {_oSDiskImage = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption _oSDiskImage; - - /// This is the disk image encryption base class. - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption OSDiskImage { get => (this._oSDiskImage = this._oSDiskImage ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DiskImageEncryption()); set => this._oSDiskImage = value; } - - /// A relative URI containing the resource ID of the disk encryption set. - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string OSDiskImageDiskEncryptionSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal)OSDiskImage).DiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal)OSDiskImage).DiskEncryptionSetId = value ?? null; } - - /// Creates an new instance. - public EncryptionImages() - { - - } - } - /// Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. - public partial interface IEncryptionImages : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable - { - /// A list of encryption specifications for data disk images. - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of encryption specifications for data disk images.", - SerializedName = @"dataDiskImages", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption[] DataDiskImage { get; set; } - /// A relative URI containing the resource ID of the disk encryption set. - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A relative URI containing the resource ID of the disk encryption set.", - SerializedName = @"diskEncryptionSetId", - PossibleTypes = new [] { typeof(string) })] - string OSDiskImageDiskEncryptionSetId { get; set; } - - } - /// Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. - internal partial interface IEncryptionImagesInternal - - { - /// A list of encryption specifications for data disk images. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption[] DataDiskImage { get; set; } - /// This is the disk image encryption base class. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption OSDiskImage { get; set; } - /// A relative URI containing the resource ID of the disk encryption set. - string OSDiskImageDiskEncryptionSetId { get; set; } - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Gallery.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Gallery.PowerShell.cs deleted file mode 100644 index 66bdebb21528..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Gallery.PowerShell.cs +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// - /// Specifies information about the Shared Image Gallery that you want to create or update. - /// - [System.ComponentModel.TypeConverter(typeof(GalleryTypeConverter))] - public partial class Gallery - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Gallery(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Gallery(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Gallery(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SharingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile) content.GetValueForProperty("SharingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SharingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfileTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryIdentifierTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SoftDeletePolicy = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy) content.GetValueForProperty("SoftDeletePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SoftDeletePolicy, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SoftDeletePolicyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SharingProfileGroup = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[]) content.GetValueForProperty("SharingProfileGroup",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SharingProfileGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfileGroupTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).IdentifierUniqueName = (string) content.GetValueForProperty("IdentifierUniqueName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).IdentifierUniqueName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SharingProfilePermission = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes?) content.GetValueForProperty("SharingProfilePermission",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SharingProfilePermission, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SoftDeletePolicyIsSoftDeleteEnabled = (bool?) content.GetValueForProperty("SoftDeletePolicyIsSoftDeleteEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SoftDeletePolicyIsSoftDeleteEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Gallery(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SharingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile) content.GetValueForProperty("SharingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SharingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfileTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryIdentifierTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SoftDeletePolicy = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy) content.GetValueForProperty("SoftDeletePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SoftDeletePolicy, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SoftDeletePolicyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SharingProfileGroup = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[]) content.GetValueForProperty("SharingProfileGroup",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SharingProfileGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfileGroupTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).IdentifierUniqueName = (string) content.GetValueForProperty("IdentifierUniqueName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).IdentifierUniqueName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SharingProfilePermission = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes?) content.GetValueForProperty("SharingProfilePermission",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SharingProfilePermission, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SoftDeletePolicyIsSoftDeleteEnabled = (bool?) content.GetValueForProperty("SoftDeletePolicyIsSoftDeleteEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal)this).SoftDeletePolicyIsSoftDeleteEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Specifies information about the Shared Image Gallery that you want to create or update. - [System.ComponentModel.TypeConverter(typeof(GalleryTypeConverter))] - public partial interface IGallery - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplication.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplication.PowerShell.cs deleted file mode 100644 index 10009dd3bc24..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplication.PowerShell.cs +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// - /// Specifies information about the gallery Application Definition that you want to create or update. - /// - [System.ComponentModel.TypeConverter(typeof(GalleryApplicationTypeConverter))] - public partial class GalleryApplication - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GalleryApplication(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GalleryApplication(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GalleryApplication(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).Eula, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).PrivacyStatementUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).ReleaseNoteUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).SupportedOSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("SupportedOSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).SupportedOSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GalleryApplication(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).Eula, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).PrivacyStatementUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).ReleaseNoteUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).SupportedOSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("SupportedOSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal)this).SupportedOSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Specifies information about the gallery Application Definition that you want to create or update. - [System.ComponentModel.TypeConverter(typeof(GalleryApplicationTypeConverter))] - public partial interface IGalleryApplication - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationUpdate.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationUpdate.PowerShell.cs deleted file mode 100644 index daefd5951718..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationUpdate.PowerShell.cs +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// - /// Specifies information about the gallery Application Definition that you want to update. - /// - [System.ComponentModel.TypeConverter(typeof(GalleryApplicationUpdateTypeConverter))] - public partial class GalleryApplicationUpdate - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GalleryApplicationUpdate(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GalleryApplicationUpdate(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GalleryApplicationUpdate(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).Eula, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).PrivacyStatementUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).ReleaseNoteUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).SupportedOSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("SupportedOSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).SupportedOSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GalleryApplicationUpdate(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).Eula, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).PrivacyStatementUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).ReleaseNoteUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).SupportedOSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("SupportedOSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal)this).SupportedOSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Specifies information about the gallery Application Definition that you want to update. - [System.ComponentModel.TypeConverter(typeof(GalleryApplicationUpdateTypeConverter))] - public partial interface IGalleryApplicationUpdate - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersion.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersion.PowerShell.cs deleted file mode 100644 index 43dd894f3e86..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersion.PowerShell.cs +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// - /// Specifies information about the gallery Application Version that you want to create or update. - /// - [System.ComponentModel.TypeConverter(typeof(GalleryApplicationVersionTypeConverter))] - public partial class GalleryApplicationVersion - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GalleryApplicationVersion(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GalleryApplicationVersion(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GalleryApplicationVersion(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionPublishingProfileTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RegionalReplicationStatusTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource) content.GetValueForProperty("PublishingProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileManageAction = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage) content.GetValueForProperty("PublishingProfileManageAction",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileManageAction, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactManageTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileEnableHealthCheck = (bool?) content.GetValueForProperty("PublishingProfileEnableHealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileEnableHealthCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PackageFileLink = (string) content.GetValueForProperty("PackageFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PackageFileLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).DefaultConfigFileLink = (string) content.GetValueForProperty("DefaultConfigFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).DefaultConfigFileLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).Install, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).Remove, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).Update, global::System.Convert.ToString); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GalleryApplicationVersion(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionPublishingProfileTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RegionalReplicationStatusTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource) content.GetValueForProperty("PublishingProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileManageAction = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage) content.GetValueForProperty("PublishingProfileManageAction",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileManageAction, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactManageTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileEnableHealthCheck = (bool?) content.GetValueForProperty("PublishingProfileEnableHealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PublishingProfileEnableHealthCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PackageFileLink = (string) content.GetValueForProperty("PackageFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).PackageFileLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).DefaultConfigFileLink = (string) content.GetValueForProperty("DefaultConfigFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).DefaultConfigFileLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).Install, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).Remove, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal)this).Update, global::System.Convert.ToString); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Specifies information about the gallery Application Version that you want to create or update. - [System.ComponentModel.TypeConverter(typeof(GalleryApplicationVersionTypeConverter))] - public partial interface IGalleryApplicationVersion - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionProperties.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionProperties.PowerShell.cs deleted file mode 100644 index 1f6f4380b83c..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionProperties.PowerShell.cs +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// Describes the properties of a gallery image version. - [System.ComponentModel.TypeConverter(typeof(GalleryApplicationVersionPropertiesTypeConverter))] - public partial class GalleryApplicationVersionProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GalleryApplicationVersionProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GalleryApplicationVersionProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GalleryApplicationVersionProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionPublishingProfileTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RegionalReplicationStatusTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource) content.GetValueForProperty("PublishingProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileManageAction = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage) content.GetValueForProperty("PublishingProfileManageAction",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileManageAction, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactManageTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileEnableHealthCheck = (bool?) content.GetValueForProperty("PublishingProfileEnableHealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileEnableHealthCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PackageFileLink = (string) content.GetValueForProperty("PackageFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PackageFileLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).DefaultConfigFileLink = (string) content.GetValueForProperty("DefaultConfigFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).DefaultConfigFileLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).Install, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).Remove, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).Update, global::System.Convert.ToString); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GalleryApplicationVersionProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionPublishingProfileTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RegionalReplicationStatusTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource) content.GetValueForProperty("PublishingProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileManageAction = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage) content.GetValueForProperty("PublishingProfileManageAction",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileManageAction, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactManageTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileEnableHealthCheck = (bool?) content.GetValueForProperty("PublishingProfileEnableHealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileEnableHealthCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PackageFileLink = (string) content.GetValueForProperty("PackageFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).PackageFileLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).DefaultConfigFileLink = (string) content.GetValueForProperty("DefaultConfigFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).DefaultConfigFileLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).Install, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).Remove, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)this).Update, global::System.Convert.ToString); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes the properties of a gallery image version. - [System.ComponentModel.TypeConverter(typeof(GalleryApplicationVersionPropertiesTypeConverter))] - public partial interface IGalleryApplicationVersionProperties - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionPublishingProfile.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionPublishingProfile.PowerShell.cs deleted file mode 100644 index bc29873bcc18..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionPublishingProfile.PowerShell.cs +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// The publishing profile of a gallery image version. - [System.ComponentModel.TypeConverter(typeof(GalleryApplicationVersionPublishingProfileTypeConverter))] - public partial class GalleryApplicationVersionPublishingProfile - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GalleryApplicationVersionPublishingProfile(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GalleryApplicationVersionPublishingProfile(content); - } - - /// - /// Creates a new instance of , deserializing the content from a - /// json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GalleryApplicationVersionPublishingProfile(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).ManageAction = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage) content.GetValueForProperty("ManageAction",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).ManageAction, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactManageTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).EnableHealthCheck = (bool?) content.GetValueForProperty("EnableHealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).EnableHealthCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("StorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("ReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).PackageFileLink = (string) content.GetValueForProperty("PackageFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).PackageFileLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).DefaultConfigFileLink = (string) content.GetValueForProperty("DefaultConfigFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).DefaultConfigFileLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).Install, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).Remove, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).Update, global::System.Convert.ToString); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GalleryApplicationVersionPublishingProfile(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).ManageAction = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage) content.GetValueForProperty("ManageAction",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).ManageAction, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactManageTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).EnableHealthCheck = (bool?) content.GetValueForProperty("EnableHealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).EnableHealthCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("StorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("ReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).PackageFileLink = (string) content.GetValueForProperty("PackageFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).PackageFileLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).DefaultConfigFileLink = (string) content.GetValueForProperty("DefaultConfigFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).DefaultConfigFileLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).Install, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).Remove, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)this).Update, global::System.Convert.ToString); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The publishing profile of a gallery image version. - [System.ComponentModel.TypeConverter(typeof(GalleryApplicationVersionPublishingProfileTypeConverter))] - public partial interface IGalleryApplicationVersionPublishingProfile - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionUpdate.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionUpdate.PowerShell.cs deleted file mode 100644 index 7eca17c32675..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionUpdate.PowerShell.cs +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// - /// Specifies information about the gallery Application Version that you want to update. - /// - [System.ComponentModel.TypeConverter(typeof(GalleryApplicationVersionUpdateTypeConverter))] - public partial class GalleryApplicationVersionUpdate - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GalleryApplicationVersionUpdate(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GalleryApplicationVersionUpdate(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GalleryApplicationVersionUpdate(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionPublishingProfileTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RegionalReplicationStatusTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource) content.GetValueForProperty("PublishingProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileManageAction = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage) content.GetValueForProperty("PublishingProfileManageAction",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileManageAction, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactManageTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileEnableHealthCheck = (bool?) content.GetValueForProperty("PublishingProfileEnableHealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileEnableHealthCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PackageFileLink = (string) content.GetValueForProperty("PackageFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PackageFileLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).DefaultConfigFileLink = (string) content.GetValueForProperty("DefaultConfigFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).DefaultConfigFileLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).Install, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).Remove, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).Update, global::System.Convert.ToString); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GalleryApplicationVersionUpdate(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionPublishingProfileTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RegionalReplicationStatusTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource) content.GetValueForProperty("PublishingProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileManageAction = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage) content.GetValueForProperty("PublishingProfileManageAction",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileManageAction, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactManageTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileEnableHealthCheck = (bool?) content.GetValueForProperty("PublishingProfileEnableHealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileEnableHealthCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PackageFileLink = (string) content.GetValueForProperty("PackageFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).PackageFileLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).DefaultConfigFileLink = (string) content.GetValueForProperty("DefaultConfigFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).DefaultConfigFileLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).Install, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).Remove, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal)this).Update, global::System.Convert.ToString); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Specifies information about the gallery Application Version that you want to update. - [System.ComponentModel.TypeConverter(typeof(GalleryApplicationVersionUpdateTypeConverter))] - public partial interface IGalleryApplicationVersionUpdate - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactPublishingProfileBase.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactPublishingProfileBase.PowerShell.cs deleted file mode 100644 index c126f0e654eb..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactPublishingProfileBase.PowerShell.cs +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// Describes the basic gallery artifact publishing profile. - [System.ComponentModel.TypeConverter(typeof(GalleryArtifactPublishingProfileBaseTypeConverter))] - public partial class GalleryArtifactPublishingProfileBase - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GalleryArtifactPublishingProfileBase(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GalleryArtifactPublishingProfileBase(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GalleryArtifactPublishingProfileBase(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("StorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("ReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GalleryArtifactPublishingProfileBase(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("StorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("ReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes the basic gallery artifact publishing profile. - [System.ComponentModel.TypeConverter(typeof(GalleryArtifactPublishingProfileBaseTypeConverter))] - public partial interface IGalleryArtifactPublishingProfileBase - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImage.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImage.PowerShell.cs deleted file mode 100644 index 4a0fb2d0c18b..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImage.PowerShell.cs +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// - /// Specifies information about the gallery image definition that you want to create or update. - /// - [System.ComponentModel.TypeConverter(typeof(GalleryImageTypeConverter))] - public partial class GalleryImage - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GalleryImage(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GalleryImage(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GalleryImage(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImagePropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Disallowed = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed) content.GetValueForProperty("Disallowed",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Disallowed, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DisallowedTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageIdentifierTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Recommended = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration) content.GetValueForProperty("Recommended",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Recommended, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RecommendedMachineConfigurationTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PurchasePlan = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan) content.GetValueForProperty("PurchasePlan",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PurchasePlan, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ImagePurchasePlanTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Eula, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PrivacyStatementUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).ReleaseNoteUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).OSState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes) content.GetValueForProperty("OSState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).OSState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).HyperVGeneration = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration?) content.GetValueForProperty("HyperVGeneration",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).HyperVGeneration, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Feature = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature[]) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Feature, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageFeatureTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).DisallowedDiskType = (string[]) content.GetValueForProperty("DisallowedDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).DisallowedDiskType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).IdentifierPublisher = (string) content.GetValueForProperty("IdentifierPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).IdentifierPublisher, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).IdentifierOffer = (string) content.GetValueForProperty("IdentifierOffer",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).IdentifierOffer, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).IdentifierSku = (string) content.GetValueForProperty("IdentifierSku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).IdentifierSku, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).RecommendedVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange) content.GetValueForProperty("RecommendedVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).RecommendedVCpUs, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRangeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).RecommendedMemory = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange) content.GetValueForProperty("RecommendedMemory",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).RecommendedMemory, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRangeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PurchasePlanName = (string) content.GetValueForProperty("PurchasePlanName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PurchasePlanName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PurchasePlanPublisher = (string) content.GetValueForProperty("PurchasePlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PurchasePlanPublisher, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PurchasePlanProduct = (string) content.GetValueForProperty("PurchasePlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PurchasePlanProduct, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GalleryImage(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImagePropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Disallowed = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed) content.GetValueForProperty("Disallowed",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Disallowed, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DisallowedTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageIdentifierTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Recommended = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration) content.GetValueForProperty("Recommended",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Recommended, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RecommendedMachineConfigurationTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PurchasePlan = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan) content.GetValueForProperty("PurchasePlan",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PurchasePlan, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ImagePurchasePlanTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Eula, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PrivacyStatementUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).ReleaseNoteUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).OSState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes) content.GetValueForProperty("OSState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).OSState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).HyperVGeneration = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration?) content.GetValueForProperty("HyperVGeneration",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).HyperVGeneration, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Feature = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature[]) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).Feature, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageFeatureTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).DisallowedDiskType = (string[]) content.GetValueForProperty("DisallowedDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).DisallowedDiskType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).IdentifierPublisher = (string) content.GetValueForProperty("IdentifierPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).IdentifierPublisher, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).IdentifierOffer = (string) content.GetValueForProperty("IdentifierOffer",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).IdentifierOffer, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).IdentifierSku = (string) content.GetValueForProperty("IdentifierSku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).IdentifierSku, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).RecommendedVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange) content.GetValueForProperty("RecommendedVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).RecommendedVCpUs, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRangeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).RecommendedMemory = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange) content.GetValueForProperty("RecommendedMemory",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).RecommendedMemory, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRangeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PurchasePlanName = (string) content.GetValueForProperty("PurchasePlanName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PurchasePlanName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PurchasePlanPublisher = (string) content.GetValueForProperty("PurchasePlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PurchasePlanPublisher, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PurchasePlanProduct = (string) content.GetValueForProperty("PurchasePlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).PurchasePlanProduct, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Specifies information about the gallery image definition that you want to create or update. - [System.ComponentModel.TypeConverter(typeof(GalleryImageTypeConverter))] - public partial interface IGalleryImage - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageProperties.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageProperties.PowerShell.cs deleted file mode 100644 index c85dc847efaa..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageProperties.PowerShell.cs +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// Describes the properties of a gallery image definition. - [System.ComponentModel.TypeConverter(typeof(GalleryImagePropertiesTypeConverter))] - public partial class GalleryImageProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GalleryImageProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GalleryImageProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GalleryImageProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageIdentifierTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Recommended = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration) content.GetValueForProperty("Recommended",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Recommended, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RecommendedMachineConfigurationTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Disallowed = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed) content.GetValueForProperty("Disallowed",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Disallowed, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DisallowedTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PurchasePlan = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan) content.GetValueForProperty("PurchasePlan",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PurchasePlan, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ImagePurchasePlanTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Eula, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PrivacyStatementUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).ReleaseNoteUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).OSState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes) content.GetValueForProperty("OSState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).OSState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).HyperVGeneration = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration?) content.GetValueForProperty("HyperVGeneration",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).HyperVGeneration, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Feature = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature[]) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Feature, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageFeatureTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).DisallowedDiskType = (string[]) content.GetValueForProperty("DisallowedDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).DisallowedDiskType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).IdentifierPublisher = (string) content.GetValueForProperty("IdentifierPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).IdentifierPublisher, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).IdentifierOffer = (string) content.GetValueForProperty("IdentifierOffer",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).IdentifierOffer, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).IdentifierSku = (string) content.GetValueForProperty("IdentifierSku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).IdentifierSku, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).RecommendedVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange) content.GetValueForProperty("RecommendedVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).RecommendedVCpUs, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRangeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).RecommendedMemory = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange) content.GetValueForProperty("RecommendedMemory",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).RecommendedMemory, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRangeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PurchasePlanName = (string) content.GetValueForProperty("PurchasePlanName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PurchasePlanName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PurchasePlanPublisher = (string) content.GetValueForProperty("PurchasePlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PurchasePlanPublisher, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PurchasePlanProduct = (string) content.GetValueForProperty("PurchasePlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PurchasePlanProduct, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GalleryImageProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageIdentifierTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Recommended = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration) content.GetValueForProperty("Recommended",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Recommended, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RecommendedMachineConfigurationTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Disallowed = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed) content.GetValueForProperty("Disallowed",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Disallowed, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DisallowedTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PurchasePlan = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan) content.GetValueForProperty("PurchasePlan",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PurchasePlan, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ImagePurchasePlanTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Eula, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PrivacyStatementUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).ReleaseNoteUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).OSState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes) content.GetValueForProperty("OSState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).OSState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).HyperVGeneration = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration?) content.GetValueForProperty("HyperVGeneration",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).HyperVGeneration, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Feature = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature[]) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).Feature, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageFeatureTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).DisallowedDiskType = (string[]) content.GetValueForProperty("DisallowedDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).DisallowedDiskType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).IdentifierPublisher = (string) content.GetValueForProperty("IdentifierPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).IdentifierPublisher, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).IdentifierOffer = (string) content.GetValueForProperty("IdentifierOffer",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).IdentifierOffer, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).IdentifierSku = (string) content.GetValueForProperty("IdentifierSku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).IdentifierSku, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).RecommendedVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange) content.GetValueForProperty("RecommendedVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).RecommendedVCpUs, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRangeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).RecommendedMemory = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange) content.GetValueForProperty("RecommendedMemory",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).RecommendedMemory, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRangeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PurchasePlanName = (string) content.GetValueForProperty("PurchasePlanName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PurchasePlanName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PurchasePlanPublisher = (string) content.GetValueForProperty("PurchasePlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PurchasePlanPublisher, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PurchasePlanProduct = (string) content.GetValueForProperty("PurchasePlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).PurchasePlanProduct, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes the properties of a gallery image definition. - [System.ComponentModel.TypeConverter(typeof(GalleryImagePropertiesTypeConverter))] - public partial interface IGalleryImageProperties - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageUpdate.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageUpdate.PowerShell.cs deleted file mode 100644 index 6c2c94f0ba09..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageUpdate.PowerShell.cs +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// - /// Specifies information about the gallery image definition that you want to update. - /// - [System.ComponentModel.TypeConverter(typeof(GalleryImageUpdateTypeConverter))] - public partial class GalleryImageUpdate - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GalleryImageUpdate(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GalleryImageUpdate(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GalleryImageUpdate(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImagePropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Disallowed = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed) content.GetValueForProperty("Disallowed",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Disallowed, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DisallowedTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageIdentifierTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Recommended = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration) content.GetValueForProperty("Recommended",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Recommended, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RecommendedMachineConfigurationTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PurchasePlan = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan) content.GetValueForProperty("PurchasePlan",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PurchasePlan, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ImagePurchasePlanTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Eula, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PrivacyStatementUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).ReleaseNoteUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).OSState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes) content.GetValueForProperty("OSState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).OSState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).HyperVGeneration = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration?) content.GetValueForProperty("HyperVGeneration",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).HyperVGeneration, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Feature = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature[]) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Feature, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageFeatureTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).DisallowedDiskType = (string[]) content.GetValueForProperty("DisallowedDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).DisallowedDiskType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).IdentifierPublisher = (string) content.GetValueForProperty("IdentifierPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).IdentifierPublisher, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).IdentifierOffer = (string) content.GetValueForProperty("IdentifierOffer",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).IdentifierOffer, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).IdentifierSku = (string) content.GetValueForProperty("IdentifierSku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).IdentifierSku, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).RecommendedVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange) content.GetValueForProperty("RecommendedVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).RecommendedVCpUs, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRangeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).RecommendedMemory = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange) content.GetValueForProperty("RecommendedMemory",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).RecommendedMemory, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRangeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PurchasePlanName = (string) content.GetValueForProperty("PurchasePlanName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PurchasePlanName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PurchasePlanPublisher = (string) content.GetValueForProperty("PurchasePlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PurchasePlanPublisher, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PurchasePlanProduct = (string) content.GetValueForProperty("PurchasePlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PurchasePlanProduct, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GalleryImageUpdate(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImagePropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Disallowed = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed) content.GetValueForProperty("Disallowed",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Disallowed, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DisallowedTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageIdentifierTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Recommended = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration) content.GetValueForProperty("Recommended",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Recommended, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RecommendedMachineConfigurationTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PurchasePlan = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan) content.GetValueForProperty("PurchasePlan",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PurchasePlan, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ImagePurchasePlanTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Eula, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PrivacyStatementUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).ReleaseNoteUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).OSState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes) content.GetValueForProperty("OSState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).OSState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).HyperVGeneration = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration?) content.GetValueForProperty("HyperVGeneration",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).HyperVGeneration, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Feature = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature[]) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).Feature, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageFeatureTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).DisallowedDiskType = (string[]) content.GetValueForProperty("DisallowedDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).DisallowedDiskType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).IdentifierPublisher = (string) content.GetValueForProperty("IdentifierPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).IdentifierPublisher, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).IdentifierOffer = (string) content.GetValueForProperty("IdentifierOffer",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).IdentifierOffer, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).IdentifierSku = (string) content.GetValueForProperty("IdentifierSku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).IdentifierSku, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).RecommendedVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange) content.GetValueForProperty("RecommendedVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).RecommendedVCpUs, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRangeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).RecommendedMemory = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange) content.GetValueForProperty("RecommendedMemory",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).RecommendedMemory, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRangeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PurchasePlanName = (string) content.GetValueForProperty("PurchasePlanName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PurchasePlanName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PurchasePlanPublisher = (string) content.GetValueForProperty("PurchasePlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PurchasePlanPublisher, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PurchasePlanProduct = (string) content.GetValueForProperty("PurchasePlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).PurchasePlanProduct, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Specifies information about the gallery image definition that you want to update. - [System.ComponentModel.TypeConverter(typeof(GalleryImageUpdateTypeConverter))] - public partial interface IGalleryImageUpdate - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersion.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersion.PowerShell.cs deleted file mode 100644 index 7394ace99386..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersion.PowerShell.cs +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// - /// Specifies information about the gallery image version that you want to create or update. - /// - [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionTypeConverter))] - public partial class GalleryImageVersion - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GalleryImageVersion(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GalleryImageVersion(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GalleryImageVersion(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactPublishingProfileBaseTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionStorageProfileTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RegionalReplicationStatusTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileTargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]) content.GetValueForProperty("PublishingProfileTargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileTargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileReplicaCount = (int?) content.GetValueForProperty("PublishingProfileReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).StorageProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("StorageProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).StorageProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).StorageProfileOSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage) content.GetValueForProperty("StorageProfileOSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).StorageProfileOSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDiskImageTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).StorageProfileDataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[]) content.GetValueForProperty("StorageProfileDataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).StorageProfileDataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDataDiskImageTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageHostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("OSDiskImageHostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageHostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PropertiesStorageProfileSourceId = (string) content.GetValueForProperty("PropertiesStorageProfileSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PropertiesStorageProfileSourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).Uri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("OSDiskImageSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageSourceId = (string) content.GetValueForProperty("OSDiskImageSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageSourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageSourceUri = (string) content.GetValueForProperty("OSDiskImageSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageSourceUri, global::System.Convert.ToString); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GalleryImageVersion(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactPublishingProfileBaseTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionStorageProfileTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RegionalReplicationStatusTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileTargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]) content.GetValueForProperty("PublishingProfileTargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileTargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileReplicaCount = (int?) content.GetValueForProperty("PublishingProfileReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).StorageProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("StorageProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).StorageProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).StorageProfileOSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage) content.GetValueForProperty("StorageProfileOSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).StorageProfileOSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDiskImageTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).StorageProfileDataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[]) content.GetValueForProperty("StorageProfileDataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).StorageProfileDataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDataDiskImageTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageHostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("OSDiskImageHostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageHostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PropertiesStorageProfileSourceId = (string) content.GetValueForProperty("PropertiesStorageProfileSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).PropertiesStorageProfileSourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).Uri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("OSDiskImageSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageSourceId = (string) content.GetValueForProperty("OSDiskImageSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageSourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageSourceUri = (string) content.GetValueForProperty("OSDiskImageSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal)this).OSDiskImageSourceUri, global::System.Convert.ToString); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Specifies information about the gallery image version that you want to create or update. - [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionTypeConverter))] - public partial interface IGalleryImageVersion - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionProperties.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionProperties.PowerShell.cs deleted file mode 100644 index a36e260cd0e5..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionProperties.PowerShell.cs +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// Describes the properties of a gallery image version. - [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionPropertiesTypeConverter))] - public partial class GalleryImageVersionProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GalleryImageVersionProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GalleryImageVersionProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GalleryImageVersionProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactPublishingProfileBaseTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionStorageProfileTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RegionalReplicationStatusTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileTargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]) content.GetValueForProperty("PublishingProfileTargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileTargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileReplicaCount = (int?) content.GetValueForProperty("PublishingProfileReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).StorageProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("StorageProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).StorageProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).StorageProfileOSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage) content.GetValueForProperty("StorageProfileOSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).StorageProfileOSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDiskImageTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).StorageProfileDataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[]) content.GetValueForProperty("StorageProfileDataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).StorageProfileDataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDataDiskImageTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageHostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("OSDiskImageHostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageHostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).Uri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("OSDiskImageSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSourceId = (string) content.GetValueForProperty("OSDiskImageSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSourceUri = (string) content.GetValueForProperty("OSDiskImageSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSourceUri, global::System.Convert.ToString); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GalleryImageVersionProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactPublishingProfileBaseTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionStorageProfileTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RegionalReplicationStatusTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileTargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]) content.GetValueForProperty("PublishingProfileTargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileTargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileReplicaCount = (int?) content.GetValueForProperty("PublishingProfileReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).StorageProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("StorageProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).StorageProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).StorageProfileOSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage) content.GetValueForProperty("StorageProfileOSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).StorageProfileOSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDiskImageTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).StorageProfileDataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[]) content.GetValueForProperty("StorageProfileDataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).StorageProfileDataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDataDiskImageTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageHostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("OSDiskImageHostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageHostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).Uri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("OSDiskImageSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSourceId = (string) content.GetValueForProperty("OSDiskImageSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSourceUri = (string) content.GetValueForProperty("OSDiskImageSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSourceUri, global::System.Convert.ToString); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes the properties of a gallery image version. - [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionPropertiesTypeConverter))] - public partial interface IGalleryImageVersionProperties - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionPublishingProfile.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionPublishingProfile.PowerShell.cs deleted file mode 100644 index b56e207a93f9..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionPublishingProfile.PowerShell.cs +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// The publishing profile of a gallery image Version. - [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionPublishingProfileTypeConverter))] - public partial class GalleryImageVersionPublishingProfile - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPublishingProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GalleryImageVersionPublishingProfile(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPublishingProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GalleryImageVersionPublishingProfile(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPublishingProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GalleryImageVersionPublishingProfile(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("StorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("ReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GalleryImageVersionPublishingProfile(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("StorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("ReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The publishing profile of a gallery image Version. - [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionPublishingProfileTypeConverter))] - public partial interface IGalleryImageVersionPublishingProfile - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionStorageProfile.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionStorageProfile.PowerShell.cs deleted file mode 100644 index 8cf6cad9e7c6..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionStorageProfile.PowerShell.cs +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// This is the storage profile of a Gallery Image Version. - [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionStorageProfileTypeConverter))] - public partial class GalleryImageVersionStorageProfile - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GalleryImageVersionStorageProfile(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GalleryImageVersionStorageProfile(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GalleryImageVersionStorageProfile(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage) content.GetValueForProperty("OSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDiskImageTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).DataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[]) content.GetValueForProperty("DataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).DataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDataDiskImageTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageHostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("OSDiskImageHostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageHostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).Uri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("OSDiskImageSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSourceId = (string) content.GetValueForProperty("OSDiskImageSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSourceUri = (string) content.GetValueForProperty("OSDiskImageSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSourceUri, global::System.Convert.ToString); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GalleryImageVersionStorageProfile(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage) content.GetValueForProperty("OSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDiskImageTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).DataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[]) content.GetValueForProperty("DataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).DataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDataDiskImageTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageHostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("OSDiskImageHostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageHostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).Uri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("OSDiskImageSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSourceId = (string) content.GetValueForProperty("OSDiskImageSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSourceUri = (string) content.GetValueForProperty("OSDiskImageSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSourceUri, global::System.Convert.ToString); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// This is the storage profile of a Gallery Image Version. - [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionStorageProfileTypeConverter))] - public partial interface IGalleryImageVersionStorageProfile - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionUpdate.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionUpdate.PowerShell.cs deleted file mode 100644 index 3a217b8c2535..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionUpdate.PowerShell.cs +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// Specifies information about the gallery image version that you want to update. - [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionUpdateTypeConverter))] - public partial class GalleryImageVersionUpdate - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GalleryImageVersionUpdate(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GalleryImageVersionUpdate(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GalleryImageVersionUpdate(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactPublishingProfileBaseTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionStorageProfileTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RegionalReplicationStatusTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileTargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]) content.GetValueForProperty("PublishingProfileTargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileTargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileReplicaCount = (int?) content.GetValueForProperty("PublishingProfileReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).StorageProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("StorageProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).StorageProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).StorageProfileOSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage) content.GetValueForProperty("StorageProfileOSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).StorageProfileOSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDiskImageTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).StorageProfileDataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[]) content.GetValueForProperty("StorageProfileDataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).StorageProfileDataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDataDiskImageTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageHostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("OSDiskImageHostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageHostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PropertiesStorageProfileSourceId = (string) content.GetValueForProperty("PropertiesStorageProfileSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PropertiesStorageProfileSourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).Uri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("OSDiskImageSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageSourceId = (string) content.GetValueForProperty("OSDiskImageSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageSourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageSourceUri = (string) content.GetValueForProperty("OSDiskImageSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageSourceUri, global::System.Convert.ToString); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GalleryImageVersionUpdate(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactPublishingProfileBaseTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionStorageProfileTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RegionalReplicationStatusTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileTargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]) content.GetValueForProperty("PublishingProfileTargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileTargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileReplicaCount = (int?) content.GetValueForProperty("PublishingProfileReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).StorageProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("StorageProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).StorageProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).StorageProfileOSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage) content.GetValueForProperty("StorageProfileOSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).StorageProfileOSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDiskImageTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).StorageProfileDataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[]) content.GetValueForProperty("StorageProfileDataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).StorageProfileDataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDataDiskImageTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageHostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("OSDiskImageHostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageHostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PropertiesStorageProfileSourceId = (string) content.GetValueForProperty("PropertiesStorageProfileSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).PropertiesStorageProfileSourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).Uri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("OSDiskImageSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageSourceId = (string) content.GetValueForProperty("OSDiskImageSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageSourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageSourceUri = (string) content.GetValueForProperty("OSDiskImageSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal)this).OSDiskImageSourceUri, global::System.Convert.ToString); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Specifies information about the gallery image version that you want to update. - [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionUpdateTypeConverter))] - public partial interface IGalleryImageVersionUpdate - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryProperties.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryProperties.PowerShell.cs deleted file mode 100644 index 881ba7c98de8..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryProperties.PowerShell.cs +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// Describes the properties of a Shared Image Gallery. - [System.ComponentModel.TypeConverter(typeof(GalleryPropertiesTypeConverter))] - public partial class GalleryProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GalleryProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GalleryProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GalleryProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryIdentifierTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SharingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile) content.GetValueForProperty("SharingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SharingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfileTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SoftDeletePolicy = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy) content.GetValueForProperty("SoftDeletePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SoftDeletePolicy, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SoftDeletePolicyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SharingProfileGroup = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[]) content.GetValueForProperty("SharingProfileGroup",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SharingProfileGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfileGroupTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).IdentifierUniqueName = (string) content.GetValueForProperty("IdentifierUniqueName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).IdentifierUniqueName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SharingProfilePermission = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes?) content.GetValueForProperty("SharingProfilePermission",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SharingProfilePermission, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SoftDeletePolicyIsSoftDeleteEnabled = (bool?) content.GetValueForProperty("SoftDeletePolicyIsSoftDeleteEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SoftDeletePolicyIsSoftDeleteEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GalleryProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryIdentifierTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SharingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile) content.GetValueForProperty("SharingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SharingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfileTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SoftDeletePolicy = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy) content.GetValueForProperty("SoftDeletePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SoftDeletePolicy, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SoftDeletePolicyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SharingProfileGroup = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[]) content.GetValueForProperty("SharingProfileGroup",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SharingProfileGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfileGroupTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).IdentifierUniqueName = (string) content.GetValueForProperty("IdentifierUniqueName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).IdentifierUniqueName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SharingProfilePermission = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes?) content.GetValueForProperty("SharingProfilePermission",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SharingProfilePermission, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SoftDeletePolicyIsSoftDeleteEnabled = (bool?) content.GetValueForProperty("SoftDeletePolicyIsSoftDeleteEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)this).SoftDeletePolicyIsSoftDeleteEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes the properties of a Shared Image Gallery. - [System.ComponentModel.TypeConverter(typeof(GalleryPropertiesTypeConverter))] - public partial interface IGalleryProperties - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryUpdate.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryUpdate.PowerShell.cs deleted file mode 100644 index 9d75992af904..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryUpdate.PowerShell.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// Specifies information about the Shared Image Gallery that you want to update. - [System.ComponentModel.TypeConverter(typeof(GalleryUpdateTypeConverter))] - public partial class GalleryUpdate - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GalleryUpdate(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GalleryUpdate(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GalleryUpdate(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SharingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile) content.GetValueForProperty("SharingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SharingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfileTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryIdentifierTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SoftDeletePolicy = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy) content.GetValueForProperty("SoftDeletePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SoftDeletePolicy, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SoftDeletePolicyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SharingProfileGroup = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[]) content.GetValueForProperty("SharingProfileGroup",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SharingProfileGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfileGroupTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).IdentifierUniqueName = (string) content.GetValueForProperty("IdentifierUniqueName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).IdentifierUniqueName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SharingProfilePermission = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes?) content.GetValueForProperty("SharingProfilePermission",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SharingProfilePermission, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SoftDeletePolicyIsSoftDeleteEnabled = (bool?) content.GetValueForProperty("SoftDeletePolicyIsSoftDeleteEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SoftDeletePolicyIsSoftDeleteEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GalleryUpdate(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SharingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile) content.GetValueForProperty("SharingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SharingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfileTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryIdentifierTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SoftDeletePolicy = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy) content.GetValueForProperty("SoftDeletePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SoftDeletePolicy, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SoftDeletePolicyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SharingProfileGroup = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[]) content.GetValueForProperty("SharingProfileGroup",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SharingProfileGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfileGroupTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).IdentifierUniqueName = (string) content.GetValueForProperty("IdentifierUniqueName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).IdentifierUniqueName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SharingProfilePermission = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes?) content.GetValueForProperty("SharingProfilePermission",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SharingProfilePermission, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SoftDeletePolicyIsSoftDeleteEnabled = (bool?) content.GetValueForProperty("SoftDeletePolicyIsSoftDeleteEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal)this).SoftDeletePolicyIsSoftDeleteEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Specifies information about the Shared Image Gallery that you want to update. - [System.ComponentModel.TypeConverter(typeof(GalleryUpdateTypeConverter))] - public partial interface IGalleryUpdate - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InnerError.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InnerError.PowerShell.cs index 24ec7246dd9c..9372978e68a3 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InnerError.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InnerError.PowerShell.cs @@ -31,7 +31,8 @@ public partial class InnerError /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class InnerError /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -82,7 +84,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInn /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// @@ -99,8 +101,14 @@ internal InnerError(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerErrorInternal)this).Exceptiontype = (string) content.GetValueForProperty("Exceptiontype",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerErrorInternal)this).Exceptiontype, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerErrorInternal)this).Errordetail = (string) content.GetValueForProperty("Errordetail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerErrorInternal)this).Errordetail, global::System.Convert.ToString); + if (content.Contains("Exceptiontype")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerErrorInternal)this).Exceptiontype = (string) content.GetValueForProperty("Exceptiontype",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerErrorInternal)this).Exceptiontype, global::System.Convert.ToString); + } + if (content.Contains("Errordetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerErrorInternal)this).Errordetail = (string) content.GetValueForProperty("Errordetail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerErrorInternal)this).Errordetail, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -118,8 +126,14 @@ internal InnerError(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerErrorInternal)this).Exceptiontype = (string) content.GetValueForProperty("Exceptiontype",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerErrorInternal)this).Exceptiontype, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerErrorInternal)this).Errordetail = (string) content.GetValueForProperty("Errordetail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerErrorInternal)this).Errordetail, global::System.Convert.ToString); + if (content.Contains("Exceptiontype")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerErrorInternal)this).Exceptiontype = (string) content.GetValueForProperty("Exceptiontype",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerErrorInternal)this).Exceptiontype, global::System.Convert.ToString); + } + if (content.Contains("Errordetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerErrorInternal)this).Errordetail = (string) content.GetValueForProperty("Errordetail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInnerErrorInternal)this).Errordetail, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InnerError.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InnerError.TypeConverter.cs index 8a0c678839ed..74bd26841539 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InnerError.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InnerError.TypeConverter.cs @@ -14,20 +14,19 @@ public partial class InnerErrorTypeConverter : global::System.Management.Automat { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +99,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InnerError.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InnerError.json.cs index 73437bc01e67..c5745defef0c 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InnerError.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InnerError.json.cs @@ -20,7 +20,7 @@ public partial class InnerError partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class InnerError /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class InnerError /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InstanceViewStatus.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InstanceViewStatus.PowerShell.cs index a5bc69485c49..7c3fca80c56d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InstanceViewStatus.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InstanceViewStatus.PowerShell.cs @@ -31,7 +31,8 @@ public partial class InstanceViewStatus /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class InstanceViewStatus /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -82,7 +84,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IIns /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// @@ -99,11 +101,26 @@ internal InstanceViewStatus(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Level = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StatusLevelTypes?) content.GetValueForProperty("Level",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Level, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StatusLevelTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).DisplayStatus = (string) content.GetValueForProperty("DisplayStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).DisplayStatus, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Time = (global::System.DateTime?) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Time, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Level")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Level = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StatusLevelTypes?) content.GetValueForProperty("Level",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Level, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StatusLevelTypes.CreateFrom); + } + if (content.Contains("DisplayStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).DisplayStatus = (string) content.GetValueForProperty("DisplayStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).DisplayStatus, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Time")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Time = (global::System.DateTime?) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Time, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } AfterDeserializeDictionary(content); } @@ -121,11 +138,26 @@ internal InstanceViewStatus(global::System.Management.Automation.PSObject conten return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Level = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StatusLevelTypes?) content.GetValueForProperty("Level",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Level, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StatusLevelTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).DisplayStatus = (string) content.GetValueForProperty("DisplayStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).DisplayStatus, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Time = (global::System.DateTime?) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Time, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Level")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Level = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StatusLevelTypes?) content.GetValueForProperty("Level",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Level, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StatusLevelTypes.CreateFrom); + } + if (content.Contains("DisplayStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).DisplayStatus = (string) content.GetValueForProperty("DisplayStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).DisplayStatus, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Time")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Time = (global::System.DateTime?) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatusInternal)this).Time, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InstanceViewStatus.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InstanceViewStatus.TypeConverter.cs index fa9d6f6ed6f8..d2e7bdd545e9 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InstanceViewStatus.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InstanceViewStatus.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class InstanceViewStatusTypeConverter : global::System.Management { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InstanceViewStatus.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InstanceViewStatus.json.cs index 53bf7ea10009..46e023283c3a 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InstanceViewStatus.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/InstanceViewStatus.json.cs @@ -20,7 +20,7 @@ public partial class InstanceViewStatus partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class InstanceViewStatus /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class InstanceViewStatus /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/OSDiskImageEncryption.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/OSDiskImageEncryption.cs deleted file mode 100644 index b06fcba3bacb..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/OSDiskImageEncryption.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; - - /// Contains encryption settings for an OS disk image. - public partial class OSDiskImageEncryption : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IOSDiskImageEncryption, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IOSDiskImageEncryptionInternal, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption __diskImageEncryption = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DiskImageEncryption(); - - /// A relative URI containing the resource ID of the disk encryption set. - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string DiskEncryptionSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal)__diskImageEncryption).DiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal)__diskImageEncryption).DiskEncryptionSetId = value ?? null; } - - /// Creates an new instance. - public OSDiskImageEncryption() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__diskImageEncryption), __diskImageEncryption); - await eventListener.AssertObjectIsValid(nameof(__diskImageEncryption), __diskImageEncryption); - } - } - /// Contains encryption settings for an OS disk image. - public partial interface IOSDiskImageEncryption : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption - { - - } - /// Contains encryption settings for an OS disk image. - internal partial interface IOSDiskImageEncryptionInternal : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Resource.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Resource.PowerShell.cs index e41c43fbf519..25674f33d13c 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Resource.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Resource.PowerShell.cs @@ -31,7 +31,8 @@ public partial class Resource /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class Resource /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -82,7 +84,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRes /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// @@ -99,11 +101,26 @@ internal Resource(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); + } AfterDeserializeDictionary(content); } @@ -121,11 +138,26 @@ internal Resource(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Resource.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Resource.TypeConverter.cs index b83a95fb9212..59e37ceaab76 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Resource.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Resource.TypeConverter.cs @@ -14,20 +14,19 @@ public partial class ResourceTypeConverter : global::System.Management.Automatio { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +99,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Resource.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Resource.json.cs index f8abb8b23cd0..61a320512e06 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Resource.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Resource.json.cs @@ -20,7 +20,7 @@ public partial class Resource partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class Resource /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class Resource /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceTags.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceTags.PowerShell.cs index a4b6a9dde42f..1f7599c7b343 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceTags.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceTags.PowerShell.cs @@ -31,7 +31,8 @@ public partial class ResourceTags /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class ResourceTags /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -82,7 +84,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRes /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceTags.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceTags.TypeConverter.cs index 54ca6b11c9c6..9a28d0ee6dc1 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceTags.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceTags.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class ResourceTagsTypeConverter : global::System.Management.Autom { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceTags.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceTags.json.cs index c659bd1ed5af..89272c259239 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceTags.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceTags.json.cs @@ -20,7 +20,7 @@ public partial class ResourceTags partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ResourceTags /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class ResourceTags /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocument.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocument.PowerShell.cs index 8fd48b47c57a..887bc2f7a33a 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocument.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocument.PowerShell.cs @@ -31,7 +31,8 @@ public partial class RunCommandDocument /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class RunCommandDocument /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -82,7 +84,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRun /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocument FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// @@ -99,13 +101,34 @@ internal RunCommandDocument(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentInternal)this).Script = (string[]) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentInternal)this).Script, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinition[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandParameterDefinitionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Schema = (string) content.GetValueForProperty("Schema",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Schema, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Label = (string) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Label, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Description, global::System.Convert.ToString); + if (content.Contains("Script")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentInternal)this).Script = (string[]) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentInternal)this).Script, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinition[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandParameterDefinitionTypeConverter.ConvertFrom)); + } + if (content.Contains("Schema")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Schema = (string) content.GetValueForProperty("Schema",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Schema, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); + } + if (content.Contains("Label")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Label = (string) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Label, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Description, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -123,13 +146,34 @@ internal RunCommandDocument(global::System.Management.Automation.PSObject conten return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentInternal)this).Script = (string[]) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentInternal)this).Script, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinition[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandParameterDefinitionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Schema = (string) content.GetValueForProperty("Schema",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Schema, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Label = (string) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Label, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Description, global::System.Convert.ToString); + if (content.Contains("Script")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentInternal)this).Script = (string[]) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentInternal)this).Script, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinition[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandParameterDefinitionTypeConverter.ConvertFrom)); + } + if (content.Contains("Schema")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Schema = (string) content.GetValueForProperty("Schema",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Schema, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); + } + if (content.Contains("Label")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Label = (string) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Label, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Description, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocument.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocument.TypeConverter.cs index 6896c6ee8e7a..d9dd968a5edf 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocument.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocument.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class RunCommandDocumentTypeConverter : global::System.Management { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocument.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocument.cs index 600ec8fc7f3e..99e44d13ff04 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocument.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocument.cs @@ -63,7 +63,7 @@ public RunCommandDocument() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocument.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocument.json.cs index 2501031bd4c7..d72bdd28a781 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocument.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocument.json.cs @@ -20,7 +20,7 @@ public partial class RunCommandDocument partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class RunCommandDocument /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class RunCommandDocument /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocumentBase.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocumentBase.PowerShell.cs index 7104ac729a9a..eac7932bc11e 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocumentBase.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocumentBase.PowerShell.cs @@ -31,7 +31,8 @@ public partial class RunCommandDocumentBase /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class RunCommandDocumentBase /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -82,7 +84,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRun /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBase FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// @@ -99,11 +101,26 @@ internal RunCommandDocumentBase(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Schema = (string) content.GetValueForProperty("Schema",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Schema, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Label = (string) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Label, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Description, global::System.Convert.ToString); + if (content.Contains("Schema")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Schema = (string) content.GetValueForProperty("Schema",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Schema, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); + } + if (content.Contains("Label")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Label = (string) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Label, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Description, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -121,11 +138,26 @@ internal RunCommandDocumentBase(global::System.Management.Automation.PSObject co return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Schema = (string) content.GetValueForProperty("Schema",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Schema, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Label = (string) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Label, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Description, global::System.Convert.ToString); + if (content.Contains("Schema")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Schema = (string) content.GetValueForProperty("Schema",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Schema, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); + } + if (content.Contains("Label")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Label = (string) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Label, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBaseInternal)this).Description, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocumentBase.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocumentBase.TypeConverter.cs index 14f46efb4f64..74eb890d0b4c 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocumentBase.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocumentBase.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class RunCommandDocumentBaseTypeConverter : global::System.Manage { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocumentBase.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocumentBase.json.cs index 2571cdb7352a..00385ccfe6d8 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocumentBase.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandDocumentBase.json.cs @@ -20,7 +20,7 @@ public partial class RunCommandDocumentBase partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class RunCommandDocumentBase /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class RunCommandDocumentBase /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInput.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInput.PowerShell.cs index ebe0c26aff33..9d883291ac81 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInput.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInput.PowerShell.cs @@ -31,7 +31,8 @@ public partial class RunCommandInput /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class RunCommandInput /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -82,7 +84,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRun /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// @@ -99,9 +101,18 @@ internal RunCommandInput(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).CommandId = (string) content.GetValueForProperty("CommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).CommandId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).Script = (string[]) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).Script, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); + if (content.Contains("CommandId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).CommandId = (string) content.GetValueForProperty("CommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).CommandId, global::System.Convert.ToString); + } + if (content.Contains("Script")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).Script = (string[]) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).Script, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); + } AfterDeserializeDictionary(content); } @@ -119,9 +130,18 @@ internal RunCommandInput(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).CommandId = (string) content.GetValueForProperty("CommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).CommandId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).Script = (string[]) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).Script, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); + if (content.Contains("CommandId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).CommandId = (string) content.GetValueForProperty("CommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).CommandId, global::System.Convert.ToString); + } + if (content.Contains("Script")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).Script = (string[]) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).Script, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInput.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInput.TypeConverter.cs index 176c7f98d87a..534efd54e0dd 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInput.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInput.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class RunCommandInputTypeConverter : global::System.Management.Au { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInput.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInput.json.cs index a324e35f9e5d..e9f5b8859151 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInput.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInput.json.cs @@ -20,7 +20,7 @@ public partial class RunCommandInput partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class RunCommandInput /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class RunCommandInput /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInputParameter.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInputParameter.PowerShell.cs index 49fbfdc7fb46..dd1b262756fe 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInputParameter.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInputParameter.PowerShell.cs @@ -31,7 +31,8 @@ public partial class RunCommandInputParameter /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class RunCommandInputParameter /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -82,7 +84,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRun /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// @@ -99,8 +101,14 @@ internal RunCommandInputParameter(global::System.Collections.IDictionary content return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameterInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameterInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameterInternal)this).Value, global::System.Convert.ToString); + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameterInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameterInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameterInternal)this).Value, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -118,8 +126,14 @@ internal RunCommandInputParameter(global::System.Management.Automation.PSObject return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameterInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameterInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameterInternal)this).Value, global::System.Convert.ToString); + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameterInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameterInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameterInternal)this).Value, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInputParameter.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInputParameter.TypeConverter.cs index dc2fcab2303c..4d3f3d7dbb02 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInputParameter.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInputParameter.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class RunCommandInputParameterTypeConverter : global::System.Mana { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInputParameter.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInputParameter.json.cs index 3ab122409217..cde3afa52377 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInputParameter.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandInputParameter.json.cs @@ -20,7 +20,7 @@ public partial class RunCommandInputParameter partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class RunCommandInputParameter /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class RunCommandInputParameter /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandListResult.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandListResult.PowerShell.cs index 313c1041ea36..95b81aa8b9e0 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandListResult.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandListResult.PowerShell.cs @@ -31,7 +31,8 @@ public partial class RunCommandListResult /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class RunCommandListResult /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -82,7 +84,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRun /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// @@ -99,8 +101,14 @@ internal RunCommandListResult(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBase[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandDocumentBaseTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandListResultInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBase[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandDocumentBaseTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandListResultInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -118,8 +126,14 @@ internal RunCommandListResult(global::System.Management.Automation.PSObject cont return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBase[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandDocumentBaseTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandListResultInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocumentBase[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandDocumentBaseTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandListResultInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandListResult.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandListResult.TypeConverter.cs index e1b515603edf..ad8e1e3dc02c 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandListResult.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandListResult.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class RunCommandListResultTypeConverter : global::System.Manageme { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandListResult.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandListResult.json.cs index 0672b8ca6900..ec9292bea515 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandListResult.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandListResult.json.cs @@ -20,7 +20,7 @@ public partial class RunCommandListResult partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class RunCommandListResult /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class RunCommandListResult /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandParameterDefinition.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandParameterDefinition.PowerShell.cs index 97514d31ea98..8d2ce97b799e 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandParameterDefinition.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandParameterDefinition.PowerShell.cs @@ -31,7 +31,8 @@ public partial class RunCommandParameterDefinition /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class RunCommandParameterDefinition /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -84,7 +86,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRun /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// @@ -101,10 +103,22 @@ internal RunCommandParameterDefinition(global::System.Collections.IDictionary co return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).DefaultValue = (string) content.GetValueForProperty("DefaultValue",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).DefaultValue, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Required = (bool?) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("DefaultValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).DefaultValue = (string) content.GetValueForProperty("DefaultValue",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).DefaultValue, global::System.Convert.ToString); + } + if (content.Contains("Required")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Required = (bool?) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } AfterDeserializeDictionary(content); } @@ -122,10 +136,22 @@ internal RunCommandParameterDefinition(global::System.Management.Automation.PSOb return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).DefaultValue = (string) content.GetValueForProperty("DefaultValue",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).DefaultValue, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Required = (bool?) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("DefaultValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).DefaultValue = (string) content.GetValueForProperty("DefaultValue",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).DefaultValue, global::System.Convert.ToString); + } + if (content.Contains("Required")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Required = (bool?) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandParameterDefinitionInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandParameterDefinition.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandParameterDefinition.TypeConverter.cs index ec9452364c10..069029d139a0 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandParameterDefinition.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandParameterDefinition.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class RunCommandParameterDefinitionTypeConverter : global::System { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandParameterDefinition.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandParameterDefinition.json.cs index 82e9b14dd499..5b2fac56a32c 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandParameterDefinition.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandParameterDefinition.json.cs @@ -20,7 +20,7 @@ public partial class RunCommandParameterDefinition partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class RunCommandParameterDefinition /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class RunCommandParameterDefinition /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandResult.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandResult.PowerShell.cs index c94fe27cfe42..64c8e19ffa0d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandResult.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandResult.PowerShell.cs @@ -30,7 +30,8 @@ public partial class RunCommandResult /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -42,7 +43,8 @@ public partial class RunCommandResult /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -81,7 +83,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRun /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// @@ -98,7 +100,10 @@ internal RunCommandResult(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + } AfterDeserializeDictionary(content); } @@ -116,7 +121,10 @@ internal RunCommandResult(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandResult.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandResult.TypeConverter.cs index 0eff22cd37eb..ba07bd8eb361 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandResult.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandResult.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class RunCommandResultTypeConverter : global::System.Management.A { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandResult.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandResult.json.cs index 38c23e0038fd..51431139024c 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandResult.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RunCommandResult.json.cs @@ -19,7 +19,7 @@ public partial class RunCommandResult partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -29,7 +29,8 @@ public partial class RunCommandResult /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -41,7 +42,8 @@ public partial class RunCommandResult /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/TargetRegion.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/TargetRegion.PowerShell.cs deleted file mode 100644 index 3f6eaa2ae8fa..000000000000 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/TargetRegion.PowerShell.cs +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; - - /// Describes the target region information. - [System.ComponentModel.TypeConverter(typeof(TargetRegionTypeConverter))] - public partial class TargetRegion - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new TargetRegion(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new TargetRegion(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal TargetRegion(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImages) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.EncryptionImagesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).RegionalReplicaCount = (int?) content.GetValueForProperty("RegionalReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).RegionalReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).StorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("StorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).StorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).EncryptionOSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption) content.GetValueForProperty("EncryptionOSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).EncryptionOSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DiskImageEncryptionTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).EncryptionDataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption[]) content.GetValueForProperty("EncryptionDataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).EncryptionDataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DataDiskImageEncryptionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).OSDiskImageDiskEncryptionSetId = (string) content.GetValueForProperty("OSDiskImageDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).OSDiskImageDiskEncryptionSetId, global::System.Convert.ToString); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal TargetRegion(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImages) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.EncryptionImagesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).RegionalReplicaCount = (int?) content.GetValueForProperty("RegionalReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).RegionalReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).StorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("StorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).StorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).EncryptionOSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption) content.GetValueForProperty("EncryptionOSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).EncryptionOSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DiskImageEncryptionTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).EncryptionDataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption[]) content.GetValueForProperty("EncryptionDataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).EncryptionDataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DataDiskImageEncryptionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).OSDiskImageDiskEncryptionSetId = (string) content.GetValueForProperty("OSDiskImageDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal)this).OSDiskImageDiskEncryptionSetId, global::System.Convert.ToString); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes the target region information. - [System.ComponentModel.TypeConverter(typeof(TargetRegionTypeConverter))] - public partial interface ITargetRegion - - { - - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResource.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResource.PowerShell.cs index b9f950f9f45a..53e8be7a310d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResource.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResource.PowerShell.cs @@ -31,7 +31,8 @@ public partial class UpdateResource /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class UpdateResource /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -82,7 +84,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpd /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -104,7 +106,10 @@ internal UpdateResource(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceTagsTypeConverter.ConvertFrom); + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceTagsTypeConverter.ConvertFrom); + } AfterDeserializeDictionary(content); } @@ -122,7 +127,10 @@ internal UpdateResource(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceTagsTypeConverter.ConvertFrom); + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceTagsTypeConverter.ConvertFrom); + } AfterDeserializePSObject(content); } } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResource.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResource.TypeConverter.cs index cd3758931dc9..eca3add566ec 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResource.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResource.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class UpdateResourceTypeConverter : global::System.Management.Aut { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResource.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResource.json.cs index faf9806627c2..196d3882600a 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResource.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResource.json.cs @@ -20,7 +20,7 @@ public partial class UpdateResource partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class UpdateResource /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class UpdateResource /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceTags.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceTags.PowerShell.cs index 24ecacfbfe71..5881cd28f69f 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceTags.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceTags.PowerShell.cs @@ -31,7 +31,8 @@ public partial class UpdateResourceTags /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class UpdateResourceTags /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -82,7 +84,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpd /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceTags.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceTags.TypeConverter.cs index 85ffce321565..6d058ed07f52 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceTags.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceTags.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class UpdateResourceTagsTypeConverter : global::System.Management { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceTags.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceTags.json.cs index 0163be6e76ad..6c119d408bca 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceTags.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceTags.json.cs @@ -20,7 +20,7 @@ public partial class UpdateResourceTags partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class UpdateResourceTags /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class UpdateResourceTags /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommand.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommand.PowerShell.cs index eeee26ed6590..71753da743ee 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommand.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommand.PowerShell.cs @@ -31,7 +31,8 @@ public partial class VirtualMachineRunCommand /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class VirtualMachineRunCommand /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -82,7 +84,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVir /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -104,34 +106,118 @@ internal VirtualMachineRunCommand(global::System.Collections.IDictionary content return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandScriptSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceView = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceView) content.GetValueForProperty("InstanceView",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceView, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandInstanceViewTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ProtectedParameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("ProtectedParameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ProtectedParameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).AsyncExecution = (bool?) content.GetValueForProperty("AsyncExecution",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).AsyncExecution, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).RunAsUser = (string) content.GetValueForProperty("RunAsUser",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).RunAsUser, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).RunAsPassword = (string) content.GetValueForProperty("RunAsPassword",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).RunAsPassword, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).TimeoutInSecond = (int?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).TimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).OutputBlobUri = (string) content.GetValueForProperty("OutputBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).OutputBlobUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ErrorBlobUri = (string) content.GetValueForProperty("ErrorBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ErrorBlobUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExecutionState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState?) content.GetValueForProperty("InstanceViewExecutionState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExecutionState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceScript = (string) content.GetValueForProperty("SourceScript",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceScript, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceScriptUri = (string) content.GetValueForProperty("SourceScriptUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceScriptUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceCommandId = (string) content.GetValueForProperty("SourceCommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceCommandId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExecutionMessage = (string) content.GetValueForProperty("InstanceViewExecutionMessage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExecutionMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExitCode = (int?) content.GetValueForProperty("InstanceViewExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewOutput = (string) content.GetValueForProperty("InstanceViewOutput",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewOutput, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewError = (string) content.GetValueForProperty("InstanceViewError",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewError, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewStartTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewEndTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewEndTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewStatuses = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("InstanceViewStatuses",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewStatuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandScriptSourceTypeConverter.ConvertFrom); + } + if (content.Contains("InstanceView")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceView = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceView) content.GetValueForProperty("InstanceView",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceView, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandInstanceViewTypeConverter.ConvertFrom); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); + } + if (content.Contains("ProtectedParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ProtectedParameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("ProtectedParameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ProtectedParameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); + } + if (content.Contains("AsyncExecution")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).AsyncExecution = (bool?) content.GetValueForProperty("AsyncExecution",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).AsyncExecution, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RunAsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).RunAsUser = (string) content.GetValueForProperty("RunAsUser",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).RunAsUser, global::System.Convert.ToString); + } + if (content.Contains("RunAsPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).RunAsPassword = (string) content.GetValueForProperty("RunAsPassword",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).RunAsPassword, global::System.Convert.ToString); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).TimeoutInSecond = (int?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).TimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OutputBlobUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).OutputBlobUri = (string) content.GetValueForProperty("OutputBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).OutputBlobUri, global::System.Convert.ToString); + } + if (content.Contains("ErrorBlobUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ErrorBlobUri = (string) content.GetValueForProperty("ErrorBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ErrorBlobUri, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewExecutionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExecutionState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState?) content.GetValueForProperty("InstanceViewExecutionState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExecutionState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState.CreateFrom); + } + if (content.Contains("SourceScript")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceScript = (string) content.GetValueForProperty("SourceScript",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceScript, global::System.Convert.ToString); + } + if (content.Contains("SourceScriptUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceScriptUri = (string) content.GetValueForProperty("SourceScriptUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceScriptUri, global::System.Convert.ToString); + } + if (content.Contains("SourceCommandId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceCommandId = (string) content.GetValueForProperty("SourceCommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceCommandId, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewExecutionMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExecutionMessage = (string) content.GetValueForProperty("InstanceViewExecutionMessage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExecutionMessage, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewExitCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExitCode = (int?) content.GetValueForProperty("InstanceViewExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("InstanceViewOutput")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewOutput = (string) content.GetValueForProperty("InstanceViewOutput",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewOutput, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewError = (string) content.GetValueForProperty("InstanceViewError",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewError, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewStartTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("InstanceViewEndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewEndTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewEndTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("InstanceViewStatuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewStatuses = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("InstanceViewStatuses",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewStatuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + } AfterDeserializeDictionary(content); } @@ -149,34 +235,118 @@ internal VirtualMachineRunCommand(global::System.Management.Automation.PSObject return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandScriptSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceView = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceView) content.GetValueForProperty("InstanceView",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceView, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandInstanceViewTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ProtectedParameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("ProtectedParameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ProtectedParameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).AsyncExecution = (bool?) content.GetValueForProperty("AsyncExecution",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).AsyncExecution, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).RunAsUser = (string) content.GetValueForProperty("RunAsUser",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).RunAsUser, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).RunAsPassword = (string) content.GetValueForProperty("RunAsPassword",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).RunAsPassword, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).TimeoutInSecond = (int?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).TimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).OutputBlobUri = (string) content.GetValueForProperty("OutputBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).OutputBlobUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ErrorBlobUri = (string) content.GetValueForProperty("ErrorBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ErrorBlobUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExecutionState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState?) content.GetValueForProperty("InstanceViewExecutionState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExecutionState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceScript = (string) content.GetValueForProperty("SourceScript",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceScript, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceScriptUri = (string) content.GetValueForProperty("SourceScriptUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceScriptUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceCommandId = (string) content.GetValueForProperty("SourceCommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceCommandId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExecutionMessage = (string) content.GetValueForProperty("InstanceViewExecutionMessage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExecutionMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExitCode = (int?) content.GetValueForProperty("InstanceViewExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewOutput = (string) content.GetValueForProperty("InstanceViewOutput",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewOutput, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewError = (string) content.GetValueForProperty("InstanceViewError",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewError, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewStartTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewEndTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewEndTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewStatuses = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("InstanceViewStatuses",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewStatuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandScriptSourceTypeConverter.ConvertFrom); + } + if (content.Contains("InstanceView")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceView = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceView) content.GetValueForProperty("InstanceView",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceView, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandInstanceViewTypeConverter.ConvertFrom); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); + } + if (content.Contains("ProtectedParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ProtectedParameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("ProtectedParameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ProtectedParameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); + } + if (content.Contains("AsyncExecution")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).AsyncExecution = (bool?) content.GetValueForProperty("AsyncExecution",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).AsyncExecution, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RunAsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).RunAsUser = (string) content.GetValueForProperty("RunAsUser",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).RunAsUser, global::System.Convert.ToString); + } + if (content.Contains("RunAsPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).RunAsPassword = (string) content.GetValueForProperty("RunAsPassword",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).RunAsPassword, global::System.Convert.ToString); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).TimeoutInSecond = (int?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).TimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OutputBlobUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).OutputBlobUri = (string) content.GetValueForProperty("OutputBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).OutputBlobUri, global::System.Convert.ToString); + } + if (content.Contains("ErrorBlobUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ErrorBlobUri = (string) content.GetValueForProperty("ErrorBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ErrorBlobUri, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewExecutionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExecutionState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState?) content.GetValueForProperty("InstanceViewExecutionState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExecutionState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState.CreateFrom); + } + if (content.Contains("SourceScript")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceScript = (string) content.GetValueForProperty("SourceScript",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceScript, global::System.Convert.ToString); + } + if (content.Contains("SourceScriptUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceScriptUri = (string) content.GetValueForProperty("SourceScriptUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceScriptUri, global::System.Convert.ToString); + } + if (content.Contains("SourceCommandId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceCommandId = (string) content.GetValueForProperty("SourceCommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).SourceCommandId, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewExecutionMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExecutionMessage = (string) content.GetValueForProperty("InstanceViewExecutionMessage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExecutionMessage, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewExitCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExitCode = (int?) content.GetValueForProperty("InstanceViewExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("InstanceViewOutput")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewOutput = (string) content.GetValueForProperty("InstanceViewOutput",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewOutput, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewError = (string) content.GetValueForProperty("InstanceViewError",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewError, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewStartTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("InstanceViewEndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewEndTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewEndTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("InstanceViewStatuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewStatuses = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("InstanceViewStatuses",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInternal)this).InstanceViewStatuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + } AfterDeserializePSObject(content); } } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommand.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommand.TypeConverter.cs index af1d91f5708d..0bd36beee046 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommand.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommand.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class VirtualMachineRunCommandTypeConverter : global::System.Mana { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommand.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommand.cs index 462dd83109fb..4918ebe33d3c 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommand.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommand.cs @@ -153,7 +153,7 @@ public partial class VirtualMachineRunCommand : /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommand.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommand.json.cs index 97f9bf2e7b98..29a3488f521d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommand.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommand.json.cs @@ -20,7 +20,7 @@ public partial class VirtualMachineRunCommand partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class VirtualMachineRunCommand /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class VirtualMachineRunCommand /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandInstanceView.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandInstanceView.PowerShell.cs index 04cfeb6f90a7..293f2fb1c1ee 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandInstanceView.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandInstanceView.PowerShell.cs @@ -31,7 +31,8 @@ public partial class VirtualMachineRunCommandInstanceView /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class VirtualMachineRunCommandInstanceView /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -84,7 +86,9 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVir /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// + /// an instance of the model class. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceView FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -106,14 +110,38 @@ internal VirtualMachineRunCommandInstanceView(global::System.Collections.IDictio return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExecutionState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState?) content.GetValueForProperty("ExecutionState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExecutionState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExecutionMessage = (string) content.GetValueForProperty("ExecutionMessage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExecutionMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExitCode = (int?) content.GetValueForProperty("ExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Output = (string) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Output, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Error = (string) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Error, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + if (content.Contains("ExecutionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExecutionState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState?) content.GetValueForProperty("ExecutionState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExecutionState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState.CreateFrom); + } + if (content.Contains("ExecutionMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExecutionMessage = (string) content.GetValueForProperty("ExecutionMessage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExecutionMessage, global::System.Convert.ToString); + } + if (content.Contains("ExitCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExitCode = (int?) content.GetValueForProperty("ExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Output")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Output = (string) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Output, global::System.Convert.ToString); + } + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Error = (string) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Error, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Statuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + } AfterDeserializeDictionary(content); } @@ -131,14 +159,38 @@ internal VirtualMachineRunCommandInstanceView(global::System.Management.Automati return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExecutionState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState?) content.GetValueForProperty("ExecutionState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExecutionState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExecutionMessage = (string) content.GetValueForProperty("ExecutionMessage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExecutionMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExitCode = (int?) content.GetValueForProperty("ExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Output = (string) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Output, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Error = (string) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Error, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + if (content.Contains("ExecutionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExecutionState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState?) content.GetValueForProperty("ExecutionState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExecutionState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState.CreateFrom); + } + if (content.Contains("ExecutionMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExecutionMessage = (string) content.GetValueForProperty("ExecutionMessage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExecutionMessage, global::System.Convert.ToString); + } + if (content.Contains("ExitCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExitCode = (int?) content.GetValueForProperty("ExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).ExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Output")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Output = (string) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Output, global::System.Convert.ToString); + } + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Error = (string) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Error, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Statuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceViewInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + } AfterDeserializePSObject(content); } } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandInstanceView.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandInstanceView.TypeConverter.cs index 934f195ffd8e..1a109c096838 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandInstanceView.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandInstanceView.TypeConverter.cs @@ -15,20 +15,20 @@ public partial class VirtualMachineRunCommandInstanceViewTypeConverter : global: { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -77,19 +77,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -101,8 +102,8 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandInstanceView.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandInstanceView.json.cs index cc1b459702be..cb32ba023468 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandInstanceView.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandInstanceView.json.cs @@ -20,7 +20,7 @@ public partial class VirtualMachineRunCommandInstanceView partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class VirtualMachineRunCommandInstanceView /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class VirtualMachineRunCommandInstanceView /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandProperties.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandProperties.PowerShell.cs index 969696c81273..7d845fd7f23a 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandProperties.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandProperties.PowerShell.cs @@ -31,7 +31,8 @@ public partial class VirtualMachineRunCommandProperties /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class VirtualMachineRunCommandProperties /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -84,7 +86,9 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVir /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// + /// an instance of the model class. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -106,28 +110,94 @@ internal VirtualMachineRunCommandProperties(global::System.Collections.IDictiona return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandScriptSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceView = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceView) content.GetValueForProperty("InstanceView",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceView, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandInstanceViewTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ProtectedParameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("ProtectedParameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ProtectedParameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).AsyncExecution = (bool?) content.GetValueForProperty("AsyncExecution",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).AsyncExecution, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).RunAsUser = (string) content.GetValueForProperty("RunAsUser",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).RunAsUser, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).RunAsPassword = (string) content.GetValueForProperty("RunAsPassword",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).RunAsPassword, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).TimeoutInSecond = (int?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).TimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).OutputBlobUri = (string) content.GetValueForProperty("OutputBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).OutputBlobUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ErrorBlobUri = (string) content.GetValueForProperty("ErrorBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ErrorBlobUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExecutionState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState?) content.GetValueForProperty("InstanceViewExecutionState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExecutionState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceScript = (string) content.GetValueForProperty("SourceScript",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceScript, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceScriptUri = (string) content.GetValueForProperty("SourceScriptUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceScriptUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceCommandId = (string) content.GetValueForProperty("SourceCommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceCommandId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExecutionMessage = (string) content.GetValueForProperty("InstanceViewExecutionMessage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExecutionMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExitCode = (int?) content.GetValueForProperty("InstanceViewExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewOutput = (string) content.GetValueForProperty("InstanceViewOutput",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewOutput, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewError = (string) content.GetValueForProperty("InstanceViewError",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewError, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewStartTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewEndTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewEndTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewStatuses = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("InstanceViewStatuses",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewStatuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandScriptSourceTypeConverter.ConvertFrom); + } + if (content.Contains("InstanceView")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceView = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceView) content.GetValueForProperty("InstanceView",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceView, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandInstanceViewTypeConverter.ConvertFrom); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); + } + if (content.Contains("ProtectedParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ProtectedParameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("ProtectedParameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ProtectedParameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); + } + if (content.Contains("AsyncExecution")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).AsyncExecution = (bool?) content.GetValueForProperty("AsyncExecution",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).AsyncExecution, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RunAsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).RunAsUser = (string) content.GetValueForProperty("RunAsUser",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).RunAsUser, global::System.Convert.ToString); + } + if (content.Contains("RunAsPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).RunAsPassword = (string) content.GetValueForProperty("RunAsPassword",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).RunAsPassword, global::System.Convert.ToString); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).TimeoutInSecond = (int?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).TimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OutputBlobUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).OutputBlobUri = (string) content.GetValueForProperty("OutputBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).OutputBlobUri, global::System.Convert.ToString); + } + if (content.Contains("ErrorBlobUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ErrorBlobUri = (string) content.GetValueForProperty("ErrorBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ErrorBlobUri, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewExecutionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExecutionState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState?) content.GetValueForProperty("InstanceViewExecutionState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExecutionState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState.CreateFrom); + } + if (content.Contains("SourceScript")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceScript = (string) content.GetValueForProperty("SourceScript",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceScript, global::System.Convert.ToString); + } + if (content.Contains("SourceScriptUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceScriptUri = (string) content.GetValueForProperty("SourceScriptUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceScriptUri, global::System.Convert.ToString); + } + if (content.Contains("SourceCommandId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceCommandId = (string) content.GetValueForProperty("SourceCommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceCommandId, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewExecutionMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExecutionMessage = (string) content.GetValueForProperty("InstanceViewExecutionMessage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExecutionMessage, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewExitCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExitCode = (int?) content.GetValueForProperty("InstanceViewExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("InstanceViewOutput")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewOutput = (string) content.GetValueForProperty("InstanceViewOutput",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewOutput, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewError = (string) content.GetValueForProperty("InstanceViewError",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewError, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewStartTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("InstanceViewEndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewEndTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewEndTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("InstanceViewStatuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewStatuses = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("InstanceViewStatuses",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewStatuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + } AfterDeserializeDictionary(content); } @@ -145,28 +215,94 @@ internal VirtualMachineRunCommandProperties(global::System.Management.Automation return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandScriptSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceView = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceView) content.GetValueForProperty("InstanceView",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceView, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandInstanceViewTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ProtectedParameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("ProtectedParameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ProtectedParameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).AsyncExecution = (bool?) content.GetValueForProperty("AsyncExecution",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).AsyncExecution, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).RunAsUser = (string) content.GetValueForProperty("RunAsUser",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).RunAsUser, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).RunAsPassword = (string) content.GetValueForProperty("RunAsPassword",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).RunAsPassword, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).TimeoutInSecond = (int?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).TimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).OutputBlobUri = (string) content.GetValueForProperty("OutputBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).OutputBlobUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ErrorBlobUri = (string) content.GetValueForProperty("ErrorBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ErrorBlobUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExecutionState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState?) content.GetValueForProperty("InstanceViewExecutionState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExecutionState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceScript = (string) content.GetValueForProperty("SourceScript",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceScript, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceScriptUri = (string) content.GetValueForProperty("SourceScriptUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceScriptUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceCommandId = (string) content.GetValueForProperty("SourceCommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceCommandId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExecutionMessage = (string) content.GetValueForProperty("InstanceViewExecutionMessage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExecutionMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExitCode = (int?) content.GetValueForProperty("InstanceViewExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewOutput = (string) content.GetValueForProperty("InstanceViewOutput",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewOutput, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewError = (string) content.GetValueForProperty("InstanceViewError",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewError, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewStartTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewEndTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewEndTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewStatuses = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("InstanceViewStatuses",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewStatuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandScriptSourceTypeConverter.ConvertFrom); + } + if (content.Contains("InstanceView")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceView = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceView) content.GetValueForProperty("InstanceView",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceView, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandInstanceViewTypeConverter.ConvertFrom); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); + } + if (content.Contains("ProtectedParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ProtectedParameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("ProtectedParameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ProtectedParameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); + } + if (content.Contains("AsyncExecution")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).AsyncExecution = (bool?) content.GetValueForProperty("AsyncExecution",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).AsyncExecution, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RunAsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).RunAsUser = (string) content.GetValueForProperty("RunAsUser",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).RunAsUser, global::System.Convert.ToString); + } + if (content.Contains("RunAsPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).RunAsPassword = (string) content.GetValueForProperty("RunAsPassword",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).RunAsPassword, global::System.Convert.ToString); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).TimeoutInSecond = (int?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).TimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OutputBlobUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).OutputBlobUri = (string) content.GetValueForProperty("OutputBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).OutputBlobUri, global::System.Convert.ToString); + } + if (content.Contains("ErrorBlobUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ErrorBlobUri = (string) content.GetValueForProperty("ErrorBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ErrorBlobUri, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewExecutionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExecutionState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState?) content.GetValueForProperty("InstanceViewExecutionState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExecutionState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState.CreateFrom); + } + if (content.Contains("SourceScript")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceScript = (string) content.GetValueForProperty("SourceScript",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceScript, global::System.Convert.ToString); + } + if (content.Contains("SourceScriptUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceScriptUri = (string) content.GetValueForProperty("SourceScriptUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceScriptUri, global::System.Convert.ToString); + } + if (content.Contains("SourceCommandId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceCommandId = (string) content.GetValueForProperty("SourceCommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).SourceCommandId, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewExecutionMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExecutionMessage = (string) content.GetValueForProperty("InstanceViewExecutionMessage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExecutionMessage, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewExitCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExitCode = (int?) content.GetValueForProperty("InstanceViewExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("InstanceViewOutput")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewOutput = (string) content.GetValueForProperty("InstanceViewOutput",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewOutput, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewError = (string) content.GetValueForProperty("InstanceViewError",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewError, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewStartTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("InstanceViewEndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewEndTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewEndTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("InstanceViewStatuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewStatuses = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("InstanceViewStatuses",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandPropertiesInternal)this).InstanceViewStatuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + } AfterDeserializePSObject(content); } } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandProperties.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandProperties.TypeConverter.cs index 039339ca011b..25188ec955de 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandProperties.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandProperties.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class VirtualMachineRunCommandPropertiesTypeConverter : global::S { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -76,19 +76,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -100,8 +101,8 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandProperties.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandProperties.json.cs index f4fe61e00801..3ee00335412e 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandProperties.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandProperties.json.cs @@ -20,7 +20,7 @@ public partial class VirtualMachineRunCommandProperties partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class VirtualMachineRunCommandProperties /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class VirtualMachineRunCommandProperties /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandScriptSource.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandScriptSource.PowerShell.cs index 59108da9fcc2..dbd3f492ba3b 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandScriptSource.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandScriptSource.PowerShell.cs @@ -31,7 +31,8 @@ public partial class VirtualMachineRunCommandScriptSource /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class VirtualMachineRunCommandScriptSource /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -84,7 +86,9 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVir /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// + /// an instance of the model class. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -106,9 +110,18 @@ internal VirtualMachineRunCommandScriptSource(global::System.Collections.IDictio return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).Script, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).ScriptUri = (string) content.GetValueForProperty("ScriptUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).ScriptUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).CommandId = (string) content.GetValueForProperty("CommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).CommandId, global::System.Convert.ToString); + if (content.Contains("Script")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).Script, global::System.Convert.ToString); + } + if (content.Contains("ScriptUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).ScriptUri = (string) content.GetValueForProperty("ScriptUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).ScriptUri, global::System.Convert.ToString); + } + if (content.Contains("CommandId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).CommandId = (string) content.GetValueForProperty("CommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).CommandId, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -126,9 +139,18 @@ internal VirtualMachineRunCommandScriptSource(global::System.Management.Automati return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).Script, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).ScriptUri = (string) content.GetValueForProperty("ScriptUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).ScriptUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).CommandId = (string) content.GetValueForProperty("CommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).CommandId, global::System.Convert.ToString); + if (content.Contains("Script")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).Script, global::System.Convert.ToString); + } + if (content.Contains("ScriptUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).ScriptUri = (string) content.GetValueForProperty("ScriptUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).ScriptUri, global::System.Convert.ToString); + } + if (content.Contains("CommandId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).CommandId = (string) content.GetValueForProperty("CommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSourceInternal)this).CommandId, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandScriptSource.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandScriptSource.TypeConverter.cs index b8a150e0d32e..3dc6f0eb8d7d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandScriptSource.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandScriptSource.TypeConverter.cs @@ -15,20 +15,20 @@ public partial class VirtualMachineRunCommandScriptSourceTypeConverter : global: { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -77,19 +77,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -101,8 +102,8 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandScriptSource.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandScriptSource.json.cs index 793c0cd67341..8b92b93d5066 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandScriptSource.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandScriptSource.json.cs @@ -20,7 +20,7 @@ public partial class VirtualMachineRunCommandScriptSource partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class VirtualMachineRunCommandScriptSource /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class VirtualMachineRunCommandScriptSource /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandUpdate.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandUpdate.PowerShell.cs index 0c5cd94b2d26..050d970eaee7 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandUpdate.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandUpdate.PowerShell.cs @@ -31,7 +31,8 @@ public partial class VirtualMachineRunCommandUpdate /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class VirtualMachineRunCommandUpdate /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -84,7 +86,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVir /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -106,30 +108,102 @@ internal VirtualMachineRunCommandUpdate(global::System.Collections.IDictionary c return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandScriptSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceView = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceView) content.GetValueForProperty("InstanceView",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceView, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandInstanceViewTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ProtectedParameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("ProtectedParameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ProtectedParameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).AsyncExecution = (bool?) content.GetValueForProperty("AsyncExecution",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).AsyncExecution, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).RunAsUser = (string) content.GetValueForProperty("RunAsUser",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).RunAsUser, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).RunAsPassword = (string) content.GetValueForProperty("RunAsPassword",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).RunAsPassword, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).TimeoutInSecond = (int?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).TimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).OutputBlobUri = (string) content.GetValueForProperty("OutputBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).OutputBlobUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ErrorBlobUri = (string) content.GetValueForProperty("ErrorBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ErrorBlobUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExecutionState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState?) content.GetValueForProperty("InstanceViewExecutionState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExecutionState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceScript = (string) content.GetValueForProperty("SourceScript",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceScript, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceScriptUri = (string) content.GetValueForProperty("SourceScriptUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceScriptUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceCommandId = (string) content.GetValueForProperty("SourceCommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceCommandId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExecutionMessage = (string) content.GetValueForProperty("InstanceViewExecutionMessage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExecutionMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExitCode = (int?) content.GetValueForProperty("InstanceViewExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewOutput = (string) content.GetValueForProperty("InstanceViewOutput",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewOutput, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewError = (string) content.GetValueForProperty("InstanceViewError",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewError, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewStartTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewEndTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewEndTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewStatuses = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("InstanceViewStatuses",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewStatuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandScriptSourceTypeConverter.ConvertFrom); + } + if (content.Contains("InstanceView")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceView = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceView) content.GetValueForProperty("InstanceView",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceView, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandInstanceViewTypeConverter.ConvertFrom); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); + } + if (content.Contains("ProtectedParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ProtectedParameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("ProtectedParameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ProtectedParameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); + } + if (content.Contains("AsyncExecution")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).AsyncExecution = (bool?) content.GetValueForProperty("AsyncExecution",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).AsyncExecution, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RunAsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).RunAsUser = (string) content.GetValueForProperty("RunAsUser",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).RunAsUser, global::System.Convert.ToString); + } + if (content.Contains("RunAsPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).RunAsPassword = (string) content.GetValueForProperty("RunAsPassword",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).RunAsPassword, global::System.Convert.ToString); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).TimeoutInSecond = (int?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).TimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OutputBlobUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).OutputBlobUri = (string) content.GetValueForProperty("OutputBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).OutputBlobUri, global::System.Convert.ToString); + } + if (content.Contains("ErrorBlobUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ErrorBlobUri = (string) content.GetValueForProperty("ErrorBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ErrorBlobUri, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewExecutionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExecutionState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState?) content.GetValueForProperty("InstanceViewExecutionState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExecutionState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState.CreateFrom); + } + if (content.Contains("SourceScript")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceScript = (string) content.GetValueForProperty("SourceScript",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceScript, global::System.Convert.ToString); + } + if (content.Contains("SourceScriptUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceScriptUri = (string) content.GetValueForProperty("SourceScriptUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceScriptUri, global::System.Convert.ToString); + } + if (content.Contains("SourceCommandId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceCommandId = (string) content.GetValueForProperty("SourceCommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceCommandId, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewExecutionMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExecutionMessage = (string) content.GetValueForProperty("InstanceViewExecutionMessage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExecutionMessage, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewExitCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExitCode = (int?) content.GetValueForProperty("InstanceViewExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("InstanceViewOutput")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewOutput = (string) content.GetValueForProperty("InstanceViewOutput",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewOutput, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewError = (string) content.GetValueForProperty("InstanceViewError",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewError, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewStartTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("InstanceViewEndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewEndTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewEndTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("InstanceViewStatuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewStatuses = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("InstanceViewStatuses",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewStatuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + } AfterDeserializeDictionary(content); } @@ -147,30 +221,102 @@ internal VirtualMachineRunCommandUpdate(global::System.Management.Automation.PSO return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandScriptSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceView = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceView) content.GetValueForProperty("InstanceView",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceView, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandInstanceViewTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ProtectedParameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("ProtectedParameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ProtectedParameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).AsyncExecution = (bool?) content.GetValueForProperty("AsyncExecution",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).AsyncExecution, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).RunAsUser = (string) content.GetValueForProperty("RunAsUser",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).RunAsUser, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).RunAsPassword = (string) content.GetValueForProperty("RunAsPassword",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).RunAsPassword, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).TimeoutInSecond = (int?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).TimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).OutputBlobUri = (string) content.GetValueForProperty("OutputBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).OutputBlobUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ErrorBlobUri = (string) content.GetValueForProperty("ErrorBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ErrorBlobUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ProvisioningState, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExecutionState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState?) content.GetValueForProperty("InstanceViewExecutionState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExecutionState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceScript = (string) content.GetValueForProperty("SourceScript",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceScript, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceScriptUri = (string) content.GetValueForProperty("SourceScriptUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceScriptUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceCommandId = (string) content.GetValueForProperty("SourceCommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceCommandId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExecutionMessage = (string) content.GetValueForProperty("InstanceViewExecutionMessage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExecutionMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExitCode = (int?) content.GetValueForProperty("InstanceViewExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewOutput = (string) content.GetValueForProperty("InstanceViewOutput",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewOutput, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewError = (string) content.GetValueForProperty("InstanceViewError",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewError, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewStartTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewEndTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewEndTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewStatuses = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("InstanceViewStatuses",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewStatuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandScriptSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandScriptSourceTypeConverter.ConvertFrom); + } + if (content.Contains("InstanceView")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceView = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandInstanceView) content.GetValueForProperty("InstanceView",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceView, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandInstanceViewTypeConverter.ConvertFrom); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); + } + if (content.Contains("ProtectedParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ProtectedParameter = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[]) content.GetValueForProperty("ProtectedParameter",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ProtectedParameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RunCommandInputParameterTypeConverter.ConvertFrom)); + } + if (content.Contains("AsyncExecution")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).AsyncExecution = (bool?) content.GetValueForProperty("AsyncExecution",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).AsyncExecution, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RunAsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).RunAsUser = (string) content.GetValueForProperty("RunAsUser",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).RunAsUser, global::System.Convert.ToString); + } + if (content.Contains("RunAsPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).RunAsPassword = (string) content.GetValueForProperty("RunAsPassword",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).RunAsPassword, global::System.Convert.ToString); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).TimeoutInSecond = (int?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).TimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OutputBlobUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).OutputBlobUri = (string) content.GetValueForProperty("OutputBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).OutputBlobUri, global::System.Convert.ToString); + } + if (content.Contains("ErrorBlobUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ErrorBlobUri = (string) content.GetValueForProperty("ErrorBlobUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ErrorBlobUri, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewExecutionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExecutionState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState?) content.GetValueForProperty("InstanceViewExecutionState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExecutionState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState.CreateFrom); + } + if (content.Contains("SourceScript")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceScript = (string) content.GetValueForProperty("SourceScript",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceScript, global::System.Convert.ToString); + } + if (content.Contains("SourceScriptUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceScriptUri = (string) content.GetValueForProperty("SourceScriptUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceScriptUri, global::System.Convert.ToString); + } + if (content.Contains("SourceCommandId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceCommandId = (string) content.GetValueForProperty("SourceCommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).SourceCommandId, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewExecutionMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExecutionMessage = (string) content.GetValueForProperty("InstanceViewExecutionMessage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExecutionMessage, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewExitCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExitCode = (int?) content.GetValueForProperty("InstanceViewExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("InstanceViewOutput")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewOutput = (string) content.GetValueForProperty("InstanceViewOutput",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewOutput, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewError = (string) content.GetValueForProperty("InstanceViewError",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewError, global::System.Convert.ToString); + } + if (content.Contains("InstanceViewStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewStartTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("InstanceViewEndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewEndTime = (global::System.DateTime?) content.GetValueForProperty("InstanceViewEndTime",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("InstanceViewStatuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewStatuses = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IInstanceViewStatus[]) content.GetValueForProperty("InstanceViewStatuses",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandUpdateInternal)this).InstanceViewStatuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.InstanceViewStatusTypeConverter.ConvertFrom)); + } AfterDeserializePSObject(content); } } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandUpdate.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandUpdate.TypeConverter.cs index 671fd876d8aa..1474cf4a50b6 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandUpdate.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandUpdate.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class VirtualMachineRunCommandUpdateTypeConverter : global::Syste { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,8 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandUpdate.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandUpdate.cs index 3854581ac138..f81434b15647 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandUpdate.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandUpdate.cs @@ -128,7 +128,7 @@ public partial class VirtualMachineRunCommandUpdate : /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandUpdate.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandUpdate.json.cs index 0e63ce784e73..8eaaa3db1535 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandUpdate.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandUpdate.json.cs @@ -20,7 +20,7 @@ public partial class VirtualMachineRunCommandUpdate partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class VirtualMachineRunCommandUpdate /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class VirtualMachineRunCommandUpdate /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandsListResult.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandsListResult.PowerShell.cs index 106e42135499..9dd0071830f6 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandsListResult.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandsListResult.PowerShell.cs @@ -31,7 +31,8 @@ public partial class VirtualMachineRunCommandsListResult /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class VirtualMachineRunCommandsListResult /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -84,7 +86,9 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVir /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// + /// an instance of the model class. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -106,8 +110,14 @@ internal VirtualMachineRunCommandsListResult(global::System.Collections.IDiction return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResultInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResultInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -125,8 +135,14 @@ internal VirtualMachineRunCommandsListResult(global::System.Management.Automatio return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResultInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommandTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResultInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandsListResult.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandsListResult.TypeConverter.cs index 147bf33cbc0a..12cede3be3b8 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandsListResult.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandsListResult.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class VirtualMachineRunCommandsListResultTypeConverter : global:: { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -76,19 +76,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -100,8 +101,8 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandsListResult.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandsListResult.json.cs index d375928d9f2d..7adf6183b543 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandsListResult.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/VirtualMachineRunCommandsListResult.json.cs @@ -20,7 +20,7 @@ public partial class VirtualMachineRunCommandsListResult partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class VirtualMachineRunCommandsListResult /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class VirtualMachineRunCommandsListResult /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/CommunityGalleryInfo.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/CommunityGalleryInfo.PowerShell.cs new file mode 100644 index 000000000000..e4180a6c27f2 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/CommunityGalleryInfo.PowerShell.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Information of community gallery if current gallery is shared to community + [System.ComponentModel.TypeConverter(typeof(CommunityGalleryInfoTypeConverter))] + public partial class CommunityGalleryInfo + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CommunityGalleryInfo(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PublisherUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).PublisherUri = (string) content.GetValueForProperty("PublisherUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).PublisherUri, global::System.Convert.ToString); + } + if (content.Contains("PublisherContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).PublisherContact = (string) content.GetValueForProperty("PublisherContact",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).PublisherContact, global::System.Convert.ToString); + } + if (content.Contains("Eula")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).Eula, global::System.Convert.ToString); + } + if (content.Contains("PublicNamePrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).PublicNamePrefix = (string) content.GetValueForProperty("PublicNamePrefix",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).PublicNamePrefix, global::System.Convert.ToString); + } + if (content.Contains("CommunityGalleryEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).CommunityGalleryEnabled = (bool?) content.GetValueForProperty("CommunityGalleryEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).CommunityGalleryEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublicName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).PublicName = (string[]) content.GetValueForProperty("PublicName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).PublicName, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CommunityGalleryInfo(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PublisherUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).PublisherUri = (string) content.GetValueForProperty("PublisherUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).PublisherUri, global::System.Convert.ToString); + } + if (content.Contains("PublisherContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).PublisherContact = (string) content.GetValueForProperty("PublisherContact",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).PublisherContact, global::System.Convert.ToString); + } + if (content.Contains("Eula")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).Eula, global::System.Convert.ToString); + } + if (content.Contains("PublicNamePrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).PublicNamePrefix = (string) content.GetValueForProperty("PublicNamePrefix",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).PublicNamePrefix, global::System.Convert.ToString); + } + if (content.Contains("CommunityGalleryEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).CommunityGalleryEnabled = (bool?) content.GetValueForProperty("CommunityGalleryEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).CommunityGalleryEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublicName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).PublicName = (string[]) content.GetValueForProperty("PublicName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal)this).PublicName, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CommunityGalleryInfo(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CommunityGalleryInfo(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Information of community gallery if current gallery is shared to community + [System.ComponentModel.TypeConverter(typeof(CommunityGalleryInfoTypeConverter))] + public partial interface ICommunityGalleryInfo + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/CommunityGalleryInfo.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/CommunityGalleryInfo.TypeConverter.cs new file mode 100644 index 000000000000..9b1f566872a1 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/CommunityGalleryInfo.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CommunityGalleryInfoTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfo ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfo).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CommunityGalleryInfo.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CommunityGalleryInfo.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CommunityGalleryInfo.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/CommunityGalleryInfo.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/CommunityGalleryInfo.cs new file mode 100644 index 000000000000..30283e2584af --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/CommunityGalleryInfo.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Information of community gallery if current gallery is shared to community + public partial class CommunityGalleryInfo : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfo, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal + { + + /// Backing field for property. + private bool? _communityGalleryEnabled; + + /// Contains info about whether community gallery sharing is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public bool? CommunityGalleryEnabled { get => this._communityGalleryEnabled; } + + /// Backing field for property. + private string _eula; + + /// End-user license agreement for community gallery image. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Eula { get => this._eula; set => this._eula = value; } + + /// Internal Acessors for CommunityGalleryEnabled + bool? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal.CommunityGalleryEnabled { get => this._communityGalleryEnabled; set { {_communityGalleryEnabled = value;} } } + + /// Internal Acessors for PublicName + string[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfoInternal.PublicName { get => this._publicName; set { {_publicName = value;} } } + + /// Backing field for property. + private string[] _publicName; + + /// Community gallery public name list. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string[] PublicName { get => this._publicName; } + + /// Backing field for property. + private string _publicNamePrefix; + + /// + /// The prefix of the gallery name that will be displayed publicly. Visible to all users. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string PublicNamePrefix { get => this._publicNamePrefix; set => this._publicNamePrefix = value; } + + /// Backing field for property. + private string _publisherContact; + + /// + /// Community gallery publisher support email. The email address of the publisher. Visible to all users. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string PublisherContact { get => this._publisherContact; set => this._publisherContact = value; } + + /// Backing field for property. + private string _publisherUri; + + /// The link to the publisher website. Visible to all users. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string PublisherUri { get => this._publisherUri; set => this._publisherUri = value; } + + /// Creates an new instance. + public CommunityGalleryInfo() + { + + } + } + /// Information of community gallery if current gallery is shared to community + public partial interface ICommunityGalleryInfo : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// Contains info about whether community gallery sharing is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Contains info about whether community gallery sharing is enabled.", + SerializedName = @"communityGalleryEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? CommunityGalleryEnabled { get; } + /// End-user license agreement for community gallery image. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"End-user license agreement for community gallery image.", + SerializedName = @"eula", + PossibleTypes = new [] { typeof(string) })] + string Eula { get; set; } + /// Community gallery public name list. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Community gallery public name list.", + SerializedName = @"publicNames", + PossibleTypes = new [] { typeof(string) })] + string[] PublicName { get; } + /// + /// The prefix of the gallery name that will be displayed publicly. Visible to all users. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The prefix of the gallery name that will be displayed publicly. Visible to all users.", + SerializedName = @"publicNamePrefix", + PossibleTypes = new [] { typeof(string) })] + string PublicNamePrefix { get; set; } + /// + /// Community gallery publisher support email. The email address of the publisher. Visible to all users. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Community gallery publisher support email. The email address of the publisher. Visible to all users.", + SerializedName = @"publisherContact", + PossibleTypes = new [] { typeof(string) })] + string PublisherContact { get; set; } + /// The link to the publisher website. Visible to all users. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the publisher website. Visible to all users.", + SerializedName = @"publisherUri", + PossibleTypes = new [] { typeof(string) })] + string PublisherUri { get; set; } + + } + /// Information of community gallery if current gallery is shared to community + internal partial interface ICommunityGalleryInfoInternal + + { + /// Contains info about whether community gallery sharing is enabled. + bool? CommunityGalleryEnabled { get; set; } + /// End-user license agreement for community gallery image. + string Eula { get; set; } + /// Community gallery public name list. + string[] PublicName { get; set; } + /// + /// The prefix of the gallery name that will be displayed publicly. Visible to all users. + /// + string PublicNamePrefix { get; set; } + /// + /// Community gallery publisher support email. The email address of the publisher. Visible to all users. + /// + string PublisherContact { get; set; } + /// The link to the publisher website. Visible to all users. + string PublisherUri { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/CommunityGalleryInfo.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/CommunityGalleryInfo.json.cs new file mode 100644 index 000000000000..84ecbb5d6570 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/CommunityGalleryInfo.json.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Information of community gallery if current gallery is shared to community + public partial class CommunityGalleryInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal CommunityGalleryInfo(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_publisherUri = If( json?.PropertyT("publisherUri"), out var __jsonPublisherUri) ? (string)__jsonPublisherUri : (string)PublisherUri;} + {_publisherContact = If( json?.PropertyT("publisherContact"), out var __jsonPublisherContact) ? (string)__jsonPublisherContact : (string)PublisherContact;} + {_eula = If( json?.PropertyT("eula"), out var __jsonEula) ? (string)__jsonEula : (string)Eula;} + {_publicNamePrefix = If( json?.PropertyT("publicNamePrefix"), out var __jsonPublicNamePrefix) ? (string)__jsonPublicNamePrefix : (string)PublicNamePrefix;} + {_communityGalleryEnabled = If( json?.PropertyT("communityGalleryEnabled"), out var __jsonCommunityGalleryEnabled) ? (bool?)__jsonCommunityGalleryEnabled : CommunityGalleryEnabled;} + {_publicName = If( json?.PropertyT("publicNames"), out var __jsonPublicNames) ? If( __jsonPublicNames as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : PublicName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ICommunityGalleryInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new CommunityGalleryInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._publisherUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._publisherUri.ToString()) : null, "publisherUri" ,container.Add ); + AddIf( null != (((object)this._publisherContact)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._publisherContact.ToString()) : null, "publisherContact" ,container.Add ); + AddIf( null != (((object)this._eula)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._eula.ToString()) : null, "eula" ,container.Add ); + AddIf( null != (((object)this._publicNamePrefix)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._publicNamePrefix.ToString()) : null, "publicNamePrefix" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._communityGalleryEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonBoolean((bool)this._communityGalleryEnabled) : null, "communityGalleryEnabled" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._publicName) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.XNodeArray(); + foreach( var __x in this._publicName ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("publicNames",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DataDiskImageEncryption.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DataDiskImageEncryption.PowerShell.cs similarity index 72% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DataDiskImageEncryption.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DataDiskImageEncryption.PowerShell.cs index fd599eb3a09a..e0e5ca527187 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DataDiskImageEncryption.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DataDiskImageEncryption.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class DataDiskImageEncryption /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class DataDiskImageEncryption /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,7 +55,7 @@ public partial class DataDiskImageEncryption partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -66,13 +68,19 @@ internal DataDiskImageEncryption(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryptionInternal)this).Lun = (int) content.GetValueForProperty("Lun",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryptionInternal)this).Lun, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); + if (content.Contains("Lun")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryptionInternal)this).Lun = (int) content.GetValueForProperty("Lun",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryptionInternal)this).Lun, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -85,33 +93,39 @@ internal DataDiskImageEncryption(global::System.Management.Automation.PSObject c return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryptionInternal)this).Lun = (int) content.GetValueForProperty("Lun",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryptionInternal)this).Lun, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); + if (content.Contains("Lun")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryptionInternal)this).Lun = (int) content.GetValueForProperty("Lun",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryptionInternal)this).Lun, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DataDiskImageEncryption(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DataDiskImageEncryption(content); } @@ -120,8 +134,8 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDat /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DataDiskImageEncryption.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DataDiskImageEncryption.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DataDiskImageEncryption.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DataDiskImageEncryption.TypeConverter.cs index fb42e385bc4c..547b9085726f 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DataDiskImageEncryption.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DataDiskImageEncryption.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class DataDiskImageEncryptionTypeConverter : global::System.Manag { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DataDiskImageEncryption.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DataDiskImageEncryption.cs similarity index 87% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DataDiskImageEncryption.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DataDiskImageEncryption.cs index 2b094fc4630f..18341a87db41 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DataDiskImageEncryption.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DataDiskImageEncryption.cs @@ -3,25 +3,25 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// Contains encryption settings for a data disk image. public partial class DataDiskImageEncryption : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryptionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryptionInternal, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption __diskImageEncryption = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DiskImageEncryption(); + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryption __diskImageEncryption = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DiskImageEncryption(); /// A relative URI containing the resource ID of the disk encryption set. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string DiskEncryptionSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal)__diskImageEncryption).DiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal)__diskImageEncryption).DiskEncryptionSetId = value ?? null; } + public string DiskEncryptionSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal)__diskImageEncryption).DiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal)__diskImageEncryption).DiskEncryptionSetId = value ?? null; } /// Backing field for property. private int _lun; @@ -43,7 +43,7 @@ public DataDiskImageEncryption() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { @@ -54,7 +54,7 @@ public DataDiskImageEncryption() /// Contains encryption settings for a data disk image. public partial interface IDataDiskImageEncryption : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryption { /// /// This property specifies the logical unit number of the data disk. This value is used to identify data disks within the @@ -71,7 +71,7 @@ public partial interface IDataDiskImageEncryption : } /// Contains encryption settings for a data disk image. internal partial interface IDataDiskImageEncryptionInternal : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal { /// /// This property specifies the logical unit number of the data disk. This value is used to identify data disks within the diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DataDiskImageEncryption.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DataDiskImageEncryption.json.cs similarity index 90% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DataDiskImageEncryption.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DataDiskImageEncryption.json.cs index d973e01a8529..6b63b5bc63f4 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DataDiskImageEncryption.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DataDiskImageEncryption.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class DataDiskImageEncryption partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class DataDiskImageEncryption /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class DataDiskImageEncryption /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -63,19 +65,19 @@ internal DataDiskImageEncryption(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runt { return; } - __diskImageEncryption = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DiskImageEncryption(json); + __diskImageEncryption = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DiskImageEncryption(json); {_lun = If( json?.PropertyT("lun"), out var __jsonLun) ? (int)__jsonLun : Lun;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new DataDiskImageEncryption(json) : null; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Disallowed.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Disallowed.PowerShell.cs similarity index 79% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Disallowed.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Disallowed.PowerShell.cs index b2f1607923ff..97ea918436ba 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Disallowed.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Disallowed.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class Disallowed /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class Disallowed /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,33 +55,33 @@ public partial class Disallowed partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Disallowed(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Disallowed(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -92,12 +94,15 @@ internal Disallowed(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowedInternal)this).DiskType = (string[]) content.GetValueForProperty("DiskType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowedInternal)this).DiskType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + if (content.Contains("DiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowedInternal)this).DiskType = (string[]) content.GetValueForProperty("DiskType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowedInternal)this).DiskType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -110,7 +115,10 @@ internal Disallowed(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowedInternal)this).DiskType = (string[]) content.GetValueForProperty("DiskType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowedInternal)this).DiskType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + if (content.Contains("DiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowedInternal)this).DiskType = (string[]) content.GetValueForProperty("DiskType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowedInternal)this).DiskType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } AfterDeserializePSObject(content); } @@ -118,8 +126,8 @@ internal Disallowed(global::System.Management.Automation.PSObject content) /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Disallowed.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Disallowed.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Disallowed.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Disallowed.TypeConverter.cs index 153c4ea0f096..c8f3e424be0f 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Disallowed.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Disallowed.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,19 @@ public partial class DisallowedTypeConverter : global::System.Management.Automat { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +99,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Disallowed.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Disallowed.cs similarity index 97% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Disallowed.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Disallowed.cs index 398697597c40..25db123ea2c0 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Disallowed.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Disallowed.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// Describes the disallowed disk types. public partial class Disallowed : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowedInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowedInternal { /// Backing field for property. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Disallowed.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Disallowed.json.cs similarity index 92% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Disallowed.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Disallowed.json.cs index 975bead5c1b8..950e516a43df 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Disallowed.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Disallowed.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class Disallowed partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class Disallowed /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class Disallowed /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -68,13 +70,13 @@ internal Disallowed(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.Json } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new Disallowed(json) : null; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DiskImageEncryption.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DiskImageEncryption.PowerShell.cs similarity index 79% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DiskImageEncryption.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DiskImageEncryption.PowerShell.cs index c269dc654a53..e24c94b57b06 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DiskImageEncryption.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DiskImageEncryption.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class DiskImageEncryption /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class DiskImageEncryption /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,33 +55,33 @@ public partial class DiskImageEncryption partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryption DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DiskImageEncryption(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryption DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DiskImageEncryption(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -92,12 +94,15 @@ internal DiskImageEncryption(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); + if (content.Contains("DiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -110,7 +115,10 @@ internal DiskImageEncryption(global::System.Management.Automation.PSObject conte return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); + if (content.Contains("DiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } @@ -118,8 +126,8 @@ internal DiskImageEncryption(global::System.Management.Automation.PSObject conte /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryption FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DiskImageEncryption.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DiskImageEncryption.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DiskImageEncryption.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DiskImageEncryption.TypeConverter.cs index ed83521fc0ad..e46608528d8d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DiskImageEncryption.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DiskImageEncryption.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class DiskImageEncryptionTypeConverter : global::System.Managemen { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryption ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryption).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DiskImageEncryption.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DiskImageEncryption.cs similarity index 96% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DiskImageEncryption.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DiskImageEncryption.cs index 6adb42bfbb1e..d1d0a05ab9a4 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DiskImageEncryption.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DiskImageEncryption.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// This is the disk image encryption base class. public partial class DiskImageEncryption : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryptionInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryption, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal { /// Backing field for property. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DiskImageEncryption.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DiskImageEncryption.json.cs similarity index 91% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DiskImageEncryption.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DiskImageEncryption.json.cs index 9dba0a4dea13..a26e409766ca 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/DiskImageEncryption.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/DiskImageEncryption.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class DiskImageEncryption partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class DiskImageEncryption /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class DiskImageEncryption /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -68,13 +70,13 @@ internal DiskImageEncryption(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime. } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryption. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryption. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryption FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new DiskImageEncryption(json) : null; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/EncryptionImages.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/EncryptionImages.PowerShell.cs new file mode 100644 index 000000000000..6b13258a080c --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/EncryptionImages.PowerShell.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. + /// + [System.ComponentModel.TypeConverter(typeof(EncryptionImagesTypeConverter))] + public partial class EncryptionImages + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EncryptionImages(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EncryptionImages(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EncryptionImages(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OSDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).OSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption) content.GetValueForProperty("OSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).OSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageEncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("DataDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).DataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption[]) content.GetValueForProperty("DataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).DataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DataDiskImageEncryptionTypeConverter.ConvertFrom)); + } + if (content.Contains("OSDiskImageDiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).OSDiskImageDiskEncryptionSetId = (string) content.GetValueForProperty("OSDiskImageDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).OSDiskImageDiskEncryptionSetId, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).OSDiskImageSecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile) content.GetValueForProperty("OSDiskImageSecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).OSDiskImageSecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageSecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfileConfidentialVMEncryptionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).SecurityProfileConfidentialVMEncryptionType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType?) content.GetValueForProperty("SecurityProfileConfidentialVMEncryptionType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).SecurityProfileConfidentialVMEncryptionType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType.CreateFrom); + } + if (content.Contains("SecurityProfileSecureVMDiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).SecurityProfileSecureVMDiskEncryptionSetId = (string) content.GetValueForProperty("SecurityProfileSecureVMDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).SecurityProfileSecureVMDiskEncryptionSetId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EncryptionImages(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OSDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).OSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption) content.GetValueForProperty("OSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).OSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageEncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("DataDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).DataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption[]) content.GetValueForProperty("DataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).DataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DataDiskImageEncryptionTypeConverter.ConvertFrom)); + } + if (content.Contains("OSDiskImageDiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).OSDiskImageDiskEncryptionSetId = (string) content.GetValueForProperty("OSDiskImageDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).OSDiskImageDiskEncryptionSetId, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).OSDiskImageSecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile) content.GetValueForProperty("OSDiskImageSecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).OSDiskImageSecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageSecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfileConfidentialVMEncryptionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).SecurityProfileConfidentialVMEncryptionType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType?) content.GetValueForProperty("SecurityProfileConfidentialVMEncryptionType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).SecurityProfileConfidentialVMEncryptionType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType.CreateFrom); + } + if (content.Contains("SecurityProfileSecureVMDiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).SecurityProfileSecureVMDiskEncryptionSetId = (string) content.GetValueForProperty("SecurityProfileSecureVMDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)this).SecurityProfileSecureVMDiskEncryptionSetId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. + [System.ComponentModel.TypeConverter(typeof(EncryptionImagesTypeConverter))] + public partial interface IEncryptionImages + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/EncryptionImages.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/EncryptionImages.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/EncryptionImages.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/EncryptionImages.TypeConverter.cs index d4ddfe25cb79..4ae423b24e7f 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/EncryptionImages.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/EncryptionImages.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class EncryptionImagesTypeConverter : global::System.Management.A { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImages ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImages).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/EncryptionImages.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/EncryptionImages.cs new file mode 100644 index 000000000000..02b418ed8199 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/EncryptionImages.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// + /// Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. + /// + public partial class EncryptionImages : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption[] _dataDiskImage; + + /// A list of encryption specifications for data disk images. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption[] DataDiskImage { get => this._dataDiskImage; set => this._dataDiskImage = value; } + + /// Internal Acessors for OSDiskImage + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal.OSDiskImage { get => (this._oSDiskImage = this._oSDiskImage ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageEncryption()); set { {_oSDiskImage = value;} } } + + /// Internal Acessors for OSDiskImageSecurityProfile + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal.OSDiskImageSecurityProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal)OSDiskImage).SecurityProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal)OSDiskImage).SecurityProfile = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption _oSDiskImage; + + /// Contains encryption settings for an OS disk image. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption OSDiskImage { get => (this._oSDiskImage = this._oSDiskImage ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageEncryption()); set => this._oSDiskImage = value; } + + /// A relative URI containing the resource ID of the disk encryption set. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string OSDiskImageDiskEncryptionSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal)OSDiskImage).DiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal)OSDiskImage).DiskEncryptionSetId = value ?? null; } + + /// confidential VM encryption types + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType? SecurityProfileConfidentialVMEncryptionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal)OSDiskImage).SecurityProfileConfidentialVMEncryptionType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal)OSDiskImage).SecurityProfileConfidentialVMEncryptionType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType)""); } + + /// secure VM disk encryption set id + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string SecurityProfileSecureVMDiskEncryptionSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal)OSDiskImage).SecurityProfileSecureVMDiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal)OSDiskImage).SecurityProfileSecureVMDiskEncryptionSetId = value ?? null; } + + /// Creates an new instance. + public EncryptionImages() + { + + } + } + /// Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. + public partial interface IEncryptionImages : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// A list of encryption specifications for data disk images. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of encryption specifications for data disk images.", + SerializedName = @"dataDiskImages", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption[] DataDiskImage { get; set; } + /// A relative URI containing the resource ID of the disk encryption set. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A relative URI containing the resource ID of the disk encryption set.", + SerializedName = @"diskEncryptionSetId", + PossibleTypes = new [] { typeof(string) })] + string OSDiskImageDiskEncryptionSetId { get; set; } + /// confidential VM encryption types + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"confidential VM encryption types", + SerializedName = @"confidentialVMEncryptionType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType? SecurityProfileConfidentialVMEncryptionType { get; set; } + /// secure VM disk encryption set id + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"secure VM disk encryption set id", + SerializedName = @"secureVMDiskEncryptionSetId", + PossibleTypes = new [] { typeof(string) })] + string SecurityProfileSecureVMDiskEncryptionSetId { get; set; } + + } + /// Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. + internal partial interface IEncryptionImagesInternal + + { + /// A list of encryption specifications for data disk images. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption[] DataDiskImage { get; set; } + /// Contains encryption settings for an OS disk image. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption OSDiskImage { get; set; } + /// A relative URI containing the resource ID of the disk encryption set. + string OSDiskImageDiskEncryptionSetId { get; set; } + /// This property specifies the security profile of an OS disk image. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile OSDiskImageSecurityProfile { get; set; } + /// confidential VM encryption types + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType? SecurityProfileConfidentialVMEncryptionType { get; set; } + /// secure VM disk encryption set id + string SecurityProfileSecureVMDiskEncryptionSetId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/EncryptionImages.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/EncryptionImages.json.cs similarity index 89% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/EncryptionImages.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/EncryptionImages.json.cs index 0ca0a8608f71..bf22a26d509f 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/EncryptionImages.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/EncryptionImages.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -22,7 +22,7 @@ public partial class EncryptionImages partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -32,7 +32,8 @@ public partial class EncryptionImages /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -44,7 +45,8 @@ public partial class EncryptionImages /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -65,19 +67,19 @@ internal EncryptionImages(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Jso { return; } - {_oSDiskImage = If( json?.PropertyT("osDiskImage"), out var __jsonOSDiskImage) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DiskImageEncryption.FromJson(__jsonOSDiskImage) : OSDiskImage;} - {_dataDiskImage = If( json?.PropertyT("dataDiskImages"), out var __jsonDataDiskImages) ? If( __jsonDataDiskImages as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DataDiskImageEncryption.FromJson(__u) )) ))() : null : DataDiskImage;} + {_oSDiskImage = If( json?.PropertyT("osDiskImage"), out var __jsonOSDiskImage) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageEncryption.FromJson(__jsonOSDiskImage) : OSDiskImage;} + {_dataDiskImage = If( json?.PropertyT("dataDiskImages"), out var __jsonDataDiskImages) ? If( __jsonDataDiskImages as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DataDiskImageEncryption.FromJson(__u) )) ))() : null : DataDiskImage;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImages. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImages. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImages FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new EncryptionImages(json) : null; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.PowerShell.cs new file mode 100644 index 000000000000..26ad24591069 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.PowerShell.cs @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// Specifies information about the Shared Image Gallery that you want to create or update. + /// + [System.ComponentModel.TypeConverter(typeof(GalleryTypeConverter))] + public partial class Gallery + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Gallery(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Gallery(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Gallery(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SharingProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile) content.GetValueForProperty("SharingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SharingStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus) content.GetValueForProperty("SharingStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingStatusTypeConverter.ConvertFrom); + } + if (content.Contains("Identifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryIdentifierTypeConverter.ConvertFrom); + } + if (content.Contains("SoftDeletePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SoftDeletePolicy = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy) content.GetValueForProperty("SoftDeletePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SoftDeletePolicy, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SoftDeletePolicyTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("SharingProfileGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingProfileGroup = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[]) content.GetValueForProperty("SharingProfileGroup",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingProfileGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfileGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("SharingStatusSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[]) content.GetValueForProperty("SharingStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalSharingStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("IdentifierUniqueName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).IdentifierUniqueName = (string) content.GetValueForProperty("IdentifierUniqueName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).IdentifierUniqueName, global::System.Convert.ToString); + } + if (content.Contains("SharingProfilePermission")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingProfilePermission = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes?) content.GetValueForProperty("SharingProfilePermission",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingProfilePermission, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes.CreateFrom); + } + if (content.Contains("SharingProfileCommunityGalleryInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingProfileCommunityGalleryInfo = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny) content.GetValueForProperty("SharingProfileCommunityGalleryInfo",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingProfileCommunityGalleryInfo, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("SoftDeletePolicyIsSoftDeleteEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SoftDeletePolicyIsSoftDeleteEnabled = (bool?) content.GetValueForProperty("SoftDeletePolicyIsSoftDeleteEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SoftDeletePolicyIsSoftDeleteEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SharingStatusAggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState?) content.GetValueForProperty("SharingStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Gallery(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SharingProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile) content.GetValueForProperty("SharingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SharingStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus) content.GetValueForProperty("SharingStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingStatusTypeConverter.ConvertFrom); + } + if (content.Contains("Identifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryIdentifierTypeConverter.ConvertFrom); + } + if (content.Contains("SoftDeletePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SoftDeletePolicy = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy) content.GetValueForProperty("SoftDeletePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SoftDeletePolicy, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SoftDeletePolicyTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("SharingProfileGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingProfileGroup = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[]) content.GetValueForProperty("SharingProfileGroup",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingProfileGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfileGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("SharingStatusSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[]) content.GetValueForProperty("SharingStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalSharingStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("IdentifierUniqueName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).IdentifierUniqueName = (string) content.GetValueForProperty("IdentifierUniqueName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).IdentifierUniqueName, global::System.Convert.ToString); + } + if (content.Contains("SharingProfilePermission")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingProfilePermission = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes?) content.GetValueForProperty("SharingProfilePermission",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingProfilePermission, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes.CreateFrom); + } + if (content.Contains("SharingProfileCommunityGalleryInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingProfileCommunityGalleryInfo = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny) content.GetValueForProperty("SharingProfileCommunityGalleryInfo",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingProfileCommunityGalleryInfo, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("SoftDeletePolicyIsSoftDeleteEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SoftDeletePolicyIsSoftDeleteEnabled = (bool?) content.GetValueForProperty("SoftDeletePolicyIsSoftDeleteEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SoftDeletePolicyIsSoftDeleteEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SharingStatusAggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState?) content.GetValueForProperty("SharingStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal)this).SharingStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Specifies information about the Shared Image Gallery that you want to create or update. + [System.ComponentModel.TypeConverter(typeof(GalleryTypeConverter))] + public partial interface IGallery + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Gallery.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Gallery.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.TypeConverter.cs index 356225c4279e..99c19727a75f 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Gallery.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,19 @@ public partial class GalleryTypeConverter : global::System.Management.Automation { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +99,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Gallery.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.cs similarity index 61% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Gallery.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.cs index 27ee4f269b94..c1ff80cc745c 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Gallery.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 /// Specifies information about the Shared Image Gallery that you want to create or update. /// public partial class Gallery : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// @@ -25,7 +25,7 @@ public partial class Gallery : /// The description of this Shared Image Gallery resource. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).Description = value ?? null; } + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).Description = value ?? null; } /// Resource Id [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] @@ -35,73 +35,91 @@ public partial class Gallery : /// The unique name of the Shared Image Gallery. This name is generated automatically by Azure. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string IdentifierUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).IdentifierUniqueName; } + public string IdentifierUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).IdentifierUniqueName; } /// Resource location [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Location = value ; } + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Type = value; } + /// Internal Acessors for Identifier - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal.Identifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).Identifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).Identifier = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal.Identifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).Identifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).Identifier = value; } /// Internal Acessors for IdentifierUniqueName - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal.IdentifierUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).IdentifierUniqueName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).IdentifierUniqueName = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal.IdentifierUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).IdentifierUniqueName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).IdentifierUniqueName = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for SharingProfile - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal.SharingProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SharingProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SharingProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal.SharingProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingProfile = value; } /// Internal Acessors for SharingProfileGroup - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal.SharingProfileGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SharingProfileGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SharingProfileGroup = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal.SharingProfileGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingProfileGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingProfileGroup = value; } - /// Internal Acessors for SoftDeletePolicy - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryInternal.SoftDeletePolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SoftDeletePolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SoftDeletePolicy = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Id = value; } + /// Internal Acessors for SharingStatus + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal.SharingStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingStatus = value; } - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Name = value; } + /// Internal Acessors for SharingStatusAggregatedState + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal.SharingStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingStatusAggregatedState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingStatusAggregatedState = value; } - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Type = value; } + /// Internal Acessors for SoftDeletePolicy + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal.SoftDeletePolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SoftDeletePolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SoftDeletePolicy = value; } /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties _property; /// Describes the properties of a Shared Image Gallery. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryProperties()); set => this._property = value; } /// The provisioning state, which only appears in the response. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).ProvisioningState; } + + /// Information of community gallery if current gallery is shared to community. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny SharingProfileCommunityGalleryInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingProfileCommunityGalleryInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingProfileCommunityGalleryInfo = value ?? null /* model class */; } /// A list of sharing profile groups. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] SharingProfileGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SharingProfileGroup; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] SharingProfileGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingProfileGroup; } /// /// This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private** - ///

**Groups** + ///

**Groups**

**Community** ///
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes? SharingProfilePermission { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SharingProfilePermission; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SharingProfilePermission = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes? SharingProfilePermission { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingProfilePermission; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingProfilePermission = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes)""); } + + /// Aggregated sharing state of current gallery. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? SharingStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingStatusAggregatedState; } + + /// Summary of all regional sharing status. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[] SharingStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingStatusSummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingStatusSummary = value ?? null /* arrayOf */; } /// /// Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public bool? SoftDeletePolicyIsSoftDeleteEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SoftDeletePolicyIsSoftDeleteEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SoftDeletePolicyIsSoftDeleteEnabled = value ?? default(bool); } + public bool? SoftDeletePolicyIsSoftDeleteEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SoftDeletePolicyIsSoftDeleteEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SoftDeletePolicyIsSoftDeleteEnabled = value ?? default(bool); } /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] @@ -121,7 +139,7 @@ public Gallery() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { @@ -160,27 +178,51 @@ public partial interface IGallery : ReadOnly = true, Description = @"The provisioning state, which only appears in the response.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(string) })] - string ProvisioningState { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; } + /// Information of community gallery if current gallery is shared to community. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Information of community gallery if current gallery is shared to community.", + SerializedName = @"communityGalleryInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny SharingProfileCommunityGalleryInfo { get; set; } /// A list of sharing profile groups. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, ReadOnly = true, Description = @"A list of sharing profile groups.", SerializedName = @"groups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] SharingProfileGroup { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] SharingProfileGroup { get; } /// /// This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private** - ///

**Groups** + ///

**Groups**

**Community** ///
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, ReadOnly = false, - Description = @"This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private**

**Groups**", + Description = @"This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private**

**Groups**

**Community**", SerializedName = @"permissions", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes) })] Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes? SharingProfilePermission { get; set; } + /// Aggregated sharing state of current gallery. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Aggregated sharing state of current gallery.", + SerializedName = @"aggregatedState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? SharingStatusAggregatedState { get; } + /// Summary of all regional sharing status. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Summary of all regional sharing status.", + SerializedName = @"summary", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[] SharingStatusSummary { get; set; } /// /// Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time. /// @@ -202,26 +244,34 @@ internal partial interface IGalleryInternal : /// string Description { get; set; } /// Describes the gallery unique name. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier Identifier { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier Identifier { get; set; } /// /// The unique name of the Shared Image Gallery. This name is generated automatically by Azure. /// string IdentifierUniqueName { get; set; } /// Describes the properties of a Shared Image Gallery. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties Property { get; set; } /// The provisioning state, which only appears in the response. - string ProvisioningState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; set; } /// Profile for gallery sharing to subscription or tenant - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile SharingProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile SharingProfile { get; set; } + /// Information of community gallery if current gallery is shared to community. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny SharingProfileCommunityGalleryInfo { get; set; } /// A list of sharing profile groups. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] SharingProfileGroup { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] SharingProfileGroup { get; set; } /// /// This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private** - ///

**Groups** + ///

**Groups**

**Community** ///
Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes? SharingProfilePermission { get; set; } + /// Sharing status of current gallery. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus SharingStatus { get; set; } + /// Aggregated sharing state of current gallery. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? SharingStatusAggregatedState { get; set; } + /// Summary of all regional sharing status. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[] SharingStatusSummary { get; set; } /// Contains information about the soft deletion policy of the gallery. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy SoftDeletePolicy { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy SoftDeletePolicy { get; set; } /// /// Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time. /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Gallery.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.json.cs similarity index 91% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Gallery.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.json.cs index 3973d089b010..7ddee30c256e 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/Gallery.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -22,7 +22,7 @@ public partial class Gallery partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -32,7 +32,8 @@ public partial class Gallery /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -44,7 +45,8 @@ public partial class Gallery /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -54,13 +56,13 @@ public partial class Gallery partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new Gallery(json) : null; } @@ -78,7 +80,7 @@ internal Gallery(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObj return; } __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.PowerShell.cs new file mode 100644 index 000000000000..85e09bb5967d --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.PowerShell.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// Specifies information about the gallery Application Definition that you want to create or update. + /// + [System.ComponentModel.TypeConverter(typeof(GalleryApplicationTypeConverter))] + public partial class GalleryApplication + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryApplication(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryApplication(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryApplication(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Eula")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).Eula, global::System.Convert.ToString); + } + if (content.Contains("PrivacyStatementUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).PrivacyStatementUri, global::System.Convert.ToString); + } + if (content.Contains("ReleaseNoteUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).ReleaseNoteUri, global::System.Convert.ToString); + } + if (content.Contains("EndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SupportedOSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).SupportedOSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("SupportedOSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).SupportedOSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryApplication(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Eula")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).Eula, global::System.Convert.ToString); + } + if (content.Contains("PrivacyStatementUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).PrivacyStatementUri, global::System.Convert.ToString); + } + if (content.Contains("ReleaseNoteUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).ReleaseNoteUri, global::System.Convert.ToString); + } + if (content.Contains("EndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SupportedOSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).SupportedOSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("SupportedOSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal)this).SupportedOSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Specifies information about the gallery Application Definition that you want to create or update. + [System.ComponentModel.TypeConverter(typeof(GalleryApplicationTypeConverter))] + public partial interface IGalleryApplication + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplication.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplication.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.TypeConverter.cs index 753e3c0d639f..1594de03ed46 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplication.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryApplicationTypeConverter : global::System.Management { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplication.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.cs similarity index 90% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplication.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.cs index 610e9a73902f..e0f17287eb1a 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplication.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 /// Specifies information about the gallery Application Definition that you want to create or update. /// public partial class GalleryApplication : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// @@ -25,18 +25,18 @@ public partial class GalleryApplication : /// The description of this gallery Application Definition resource. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).Description = value ?? null; } + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).Description = value ?? null; } /// /// The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This /// property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public global::System.DateTime? EndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).EndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).EndOfLifeDate = value ?? default(global::System.DateTime); } + public global::System.DateTime? EndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).EndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).EndOfLifeDate = value ?? default(global::System.DateTime); } /// The Eula agreement for the gallery Application Definition. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Eula { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).Eula; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).Eula = value ?? null; } + public string Eula { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).Eula; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).Eula = value ?? null; } /// Resource Id [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] @@ -46,9 +46,6 @@ public partial class GalleryApplication : [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Location = value ; } - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationProperties()); set { {_property = value;} } } - /// Internal Acessors for Id string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Id = value; } @@ -58,31 +55,34 @@ public partial class GalleryApplication : /// Internal Acessors for Type string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Type = value; } + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationProperties()); set { {_property = value;} } } + /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Name; } /// The privacy statement uri. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string PrivacyStatementUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).PrivacyStatementUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).PrivacyStatementUri = value ?? null; } + public string PrivacyStatementUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).PrivacyStatementUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).PrivacyStatementUri = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties _property; /// Describes the properties of a gallery Application Definition. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationProperties()); set => this._property = value; } /// The release note uri. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string ReleaseNoteUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).ReleaseNoteUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).ReleaseNoteUri = value ?? null; } + public string ReleaseNoteUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).ReleaseNoteUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).ReleaseNoteUri = value ?? null; } /// /// This property allows you to specify the supported type of the OS that application is built for.

Possible values /// are:

**Windows**

**Linux** ///
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes? SupportedOSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).SupportedOSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).SupportedOSType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes? SupportedOSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).SupportedOSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).SupportedOSType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes)""); } /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] @@ -102,7 +102,7 @@ public GalleryApplication() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { @@ -191,7 +191,7 @@ internal partial interface IGalleryApplicationInternal : /// The privacy statement uri. string PrivacyStatementUri { get; set; } /// Describes the properties of a gallery Application Definition. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties Property { get; set; } /// The release note uri. string ReleaseNoteUri { get; set; } /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplication.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.json.cs similarity index 91% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplication.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.json.cs index 281f8d56cd5e..7ec9c362e778 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplication.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -22,7 +22,7 @@ public partial class GalleryApplication partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -32,7 +32,8 @@ public partial class GalleryApplication /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -44,7 +45,8 @@ public partial class GalleryApplication /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -54,13 +56,13 @@ public partial class GalleryApplication partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryApplication(json) : null; } @@ -78,7 +80,7 @@ internal GalleryApplication(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.J return; } __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationList.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationList.PowerShell.cs similarity index 69% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationList.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationList.PowerShell.cs index 113a372f93b6..d0274d9fe5d1 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationList.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class GalleryApplicationList /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class GalleryApplicationList /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class GalleryApplicationList partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GalleryApplicationList(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GalleryApplicationList(content); } @@ -82,11 +84,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGal /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -99,13 +101,19 @@ internal GalleryApplicationList(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationListInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -118,8 +126,14 @@ internal GalleryApplicationList(global::System.Management.Automation.PSObject co return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationListInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationList.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationList.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationList.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationList.TypeConverter.cs index 2017742d02cb..f1e364e7548a 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationList.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryApplicationListTypeConverter : global::System.Manage { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationList.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationList.cs similarity index 91% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationList.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationList.cs index 1cf01d349f7c..41b696d2c0fd 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationList.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationList.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// The List Gallery Applications operation response. public partial class GalleryApplicationList : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationList, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationListInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationList, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationListInternal { /// Backing field for property. @@ -24,11 +24,11 @@ public partial class GalleryApplicationList : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication[] _value; /// A list of Gallery Applications. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public GalleryApplicationList() @@ -57,8 +57,8 @@ public partial interface IGalleryApplicationList : ReadOnly = false, Description = @"A list of Gallery Applications.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication[] Value { get; set; } } /// The List Gallery Applications operation response. @@ -71,7 +71,7 @@ internal partial interface IGalleryApplicationListInternal /// string NextLink { get; set; } /// A list of Gallery Applications. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication[] Value { get; set; } } } \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationList.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationList.json.cs similarity index 90% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationList.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationList.json.cs index 37232c3dcff8..b9d5b6cad72b 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationList.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryApplicationList partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryApplicationList /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryApplicationList /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryApplicationList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationList FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationList FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryApplicationList(json) : null; } @@ -75,7 +77,7 @@ internal GalleryApplicationList(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runti { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplication.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplication.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationProperties.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationProperties.PowerShell.cs similarity index 51% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationProperties.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationProperties.PowerShell.cs index 1b655bc2e68a..ac4e7f861128 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationProperties.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class GalleryApplicationProperties /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class GalleryApplicationProperties /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,29 +55,29 @@ public partial class GalleryApplicationProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GalleryApplicationProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GalleryApplicationProperties(content); } @@ -84,11 +86,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGal /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -101,17 +103,35 @@ internal GalleryApplicationProperties(global::System.Collections.IDictionary con return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).Eula, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).PrivacyStatementUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).ReleaseNoteUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).SupportedOSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("SupportedOSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).SupportedOSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Eula")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).Eula, global::System.Convert.ToString); + } + if (content.Contains("PrivacyStatementUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).PrivacyStatementUri, global::System.Convert.ToString); + } + if (content.Contains("ReleaseNoteUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).ReleaseNoteUri, global::System.Convert.ToString); + } + if (content.Contains("EndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SupportedOSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).SupportedOSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("SupportedOSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).SupportedOSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -124,12 +144,30 @@ internal GalleryApplicationProperties(global::System.Management.Automation.PSObj return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).Eula, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).PrivacyStatementUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).ReleaseNoteUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).SupportedOSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("SupportedOSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)this).SupportedOSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Eula")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).Eula, global::System.Convert.ToString); + } + if (content.Contains("PrivacyStatementUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).PrivacyStatementUri, global::System.Convert.ToString); + } + if (content.Contains("ReleaseNoteUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).ReleaseNoteUri, global::System.Convert.ToString); + } + if (content.Contains("EndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SupportedOSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).SupportedOSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("SupportedOSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)this).SupportedOSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationProperties.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationProperties.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationProperties.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationProperties.TypeConverter.cs index ce83c666ed3e..d76a6c8f131e 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationProperties.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryApplicationPropertiesTypeConverter : global::System. { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationProperties.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationProperties.cs similarity index 98% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationProperties.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationProperties.cs index 2c26127d0267..0771f0a4f6a1 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationProperties.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// Describes the properties of a gallery Application Definition. public partial class GalleryApplicationProperties : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal { /// Backing field for property. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationProperties.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationProperties.json.cs similarity index 94% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationProperties.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationProperties.json.cs index 7e0fefef52b8..b37d571fb437 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationProperties.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryApplicationProperties partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryApplicationProperties /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryApplicationProperties /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryApplicationProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryApplicationProperties(json) : null; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationUpdate.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationUpdate.PowerShell.cs new file mode 100644 index 000000000000..f1e18d6850a2 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationUpdate.PowerShell.cs @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// Specifies information about the gallery Application Definition that you want to update. + /// + [System.ComponentModel.TypeConverter(typeof(GalleryApplicationUpdateTypeConverter))] + public partial class GalleryApplicationUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryApplicationUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryApplicationUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryApplicationUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Eula")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).Eula, global::System.Convert.ToString); + } + if (content.Contains("PrivacyStatementUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).PrivacyStatementUri, global::System.Convert.ToString); + } + if (content.Contains("ReleaseNoteUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).ReleaseNoteUri, global::System.Convert.ToString); + } + if (content.Contains("EndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SupportedOSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).SupportedOSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("SupportedOSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).SupportedOSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryApplicationUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Eula")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).Eula, global::System.Convert.ToString); + } + if (content.Contains("PrivacyStatementUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).PrivacyStatementUri, global::System.Convert.ToString); + } + if (content.Contains("ReleaseNoteUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).ReleaseNoteUri, global::System.Convert.ToString); + } + if (content.Contains("EndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SupportedOSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).SupportedOSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("SupportedOSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal)this).SupportedOSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Specifies information about the gallery Application Definition that you want to update. + [System.ComponentModel.TypeConverter(typeof(GalleryApplicationUpdateTypeConverter))] + public partial interface IGalleryApplicationUpdate + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationUpdate.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationUpdate.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationUpdate.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationUpdate.TypeConverter.cs index 59c4144a175b..eb7d694ab4b3 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationUpdate.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryApplicationUpdateTypeConverter : global::System.Mana { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationUpdate.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationUpdate.cs similarity index 81% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationUpdate.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationUpdate.cs index 99dc60ab48d2..608d18b6bb68 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationUpdate.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationUpdate.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -11,82 +11,82 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 /// Specifies information about the gallery Application Definition that you want to update. /// public partial class GalleryApplicationUpdate : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdate, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinition __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinition(); + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinition __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinition(); /// /// The description of this gallery Application Definition resource. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).Description = value ?? null; } + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).Description = value ?? null; } /// /// The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This /// property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public global::System.DateTime? EndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).EndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).EndOfLifeDate = value ?? default(global::System.DateTime); } + public global::System.DateTime? EndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).EndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).EndOfLifeDate = value ?? default(global::System.DateTime); } /// The Eula agreement for the gallery Application Definition. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Eula { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).Eula; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).Eula = value ?? null; } + public string Eula { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).Eula; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).Eula = value ?? null; } /// Resource Id [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationProperties()); set { {_property = value;} } } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type = value; } /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; } /// The privacy statement uri. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string PrivacyStatementUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).PrivacyStatementUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).PrivacyStatementUri = value ?? null; } + public string PrivacyStatementUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).PrivacyStatementUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).PrivacyStatementUri = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties _property; /// Describes the properties of a gallery Application Definition. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationProperties()); set => this._property = value; } /// The release note uri. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string ReleaseNoteUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).ReleaseNoteUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).ReleaseNoteUri = value ?? null; } + public string ReleaseNoteUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).ReleaseNoteUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).ReleaseNoteUri = value ?? null; } /// /// This property allows you to specify the supported type of the OS that application is built for.

Possible values /// are:

**Windows**

**Linux** ///
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes? SupportedOSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).SupportedOSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationPropertiesInternal)Property).SupportedOSType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes? SupportedOSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).SupportedOSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationPropertiesInternal)Property).SupportedOSType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes)""); } /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag = value ?? null /* model class */; } /// Resource type [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; } /// Creates an new instance. public GalleryApplicationUpdate() @@ -98,7 +98,7 @@ public GalleryApplicationUpdate() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { @@ -109,7 +109,7 @@ public GalleryApplicationUpdate() /// Specifies information about the gallery Application Definition that you want to update. public partial interface IGalleryApplicationUpdate : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinition + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinition { /// /// The description of this gallery Application Definition resource. This property is updatable. @@ -171,7 +171,7 @@ public partial interface IGalleryApplicationUpdate : } /// Specifies information about the gallery Application Definition that you want to update. internal partial interface IGalleryApplicationUpdateInternal : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal { /// /// The description of this gallery Application Definition resource. This property is updatable. @@ -187,7 +187,7 @@ internal partial interface IGalleryApplicationUpdateInternal : /// The privacy statement uri. string PrivacyStatementUri { get; set; } /// Describes the properties of a gallery Application Definition. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties Property { get; set; } /// The release note uri. string ReleaseNoteUri { get; set; } /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationUpdate.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationUpdate.json.cs similarity index 90% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationUpdate.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationUpdate.json.cs index 83628a314c99..e6a6a098ff44 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationUpdate.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -22,7 +22,7 @@ public partial class GalleryApplicationUpdate partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -32,7 +32,8 @@ public partial class GalleryApplicationUpdate /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -44,7 +45,8 @@ public partial class GalleryApplicationUpdate /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -54,13 +56,13 @@ public partial class GalleryApplicationUpdate partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryApplicationUpdate(json) : null; } @@ -77,8 +79,8 @@ internal GalleryApplicationUpdate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Run { return; } - __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinition(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationProperties.FromJson(__jsonProperties) : Property;} + __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinition(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.PowerShell.cs new file mode 100644 index 000000000000..f5fc9bbb1710 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.PowerShell.cs @@ -0,0 +1,386 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// Specifies information about the gallery Application Version that you want to create or update. + /// + [System.ComponentModel.TypeConverter(typeof(GalleryApplicationVersionTypeConverter))] + public partial class GalleryApplicationVersion + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryApplicationVersion(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryApplicationVersion(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryApplicationVersion(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("ReplicationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatusTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("PublishingProfileReplicationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); + } + if (content.Contains("ReplicationStatusSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalReplicationStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("TargetRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegionTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PublishingProfileExcludeFromLatest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublishingProfilePublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileEndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileStorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("PublishingProfileTargetExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileTargetExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[]) content.GetValueForProperty("PublishingProfileTargetExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileTargetExtendedLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocationTypeConverter.ConvertFrom)); + } + if (content.Contains("PublishingProfileSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource) content.GetValueForProperty("PublishingProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSourceTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileManageAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileManageAction = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage) content.GetValueForProperty("PublishingProfileManageAction",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileManageAction, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactManageTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileSetting = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings) content.GetValueForProperty("PublishingProfileSetting",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileSetting, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileAdvancedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileAdvancedSetting = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings) content.GetValueForProperty("PublishingProfileAdvancedSetting",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileAdvancedSetting, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfileAdvancedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileEnableHealthCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileEnableHealthCheck = (bool?) content.GetValueForProperty("PublishingProfileEnableHealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileEnableHealthCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReplicationStatusAggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); + } + if (content.Contains("PackageFileLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PackageFileLink = (string) content.GetValueForProperty("PackageFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PackageFileLink, global::System.Convert.ToString); + } + if (content.Contains("DefaultConfigFileLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).DefaultConfigFileLink = (string) content.GetValueForProperty("DefaultConfigFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).DefaultConfigFileLink, global::System.Convert.ToString); + } + if (content.Contains("Install")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).Install, global::System.Convert.ToString); + } + if (content.Contains("Remove")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).Remove, global::System.Convert.ToString); + } + if (content.Contains("Update")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).Update, global::System.Convert.ToString); + } + if (content.Contains("SettingPackageFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).SettingPackageFileName = (string) content.GetValueForProperty("SettingPackageFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).SettingPackageFileName, global::System.Convert.ToString); + } + if (content.Contains("SettingConfigFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).SettingConfigFileName = (string) content.GetValueForProperty("SettingConfigFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).SettingConfigFileName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryApplicationVersion(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("ReplicationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatusTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("PublishingProfileReplicationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); + } + if (content.Contains("ReplicationStatusSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalReplicationStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("TargetRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegionTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PublishingProfileExcludeFromLatest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublishingProfilePublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileEndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileStorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("PublishingProfileTargetExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileTargetExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[]) content.GetValueForProperty("PublishingProfileTargetExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileTargetExtendedLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocationTypeConverter.ConvertFrom)); + } + if (content.Contains("PublishingProfileSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource) content.GetValueForProperty("PublishingProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSourceTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileManageAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileManageAction = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage) content.GetValueForProperty("PublishingProfileManageAction",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileManageAction, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactManageTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileSetting = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings) content.GetValueForProperty("PublishingProfileSetting",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileSetting, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileAdvancedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileAdvancedSetting = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings) content.GetValueForProperty("PublishingProfileAdvancedSetting",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileAdvancedSetting, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfileAdvancedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileEnableHealthCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileEnableHealthCheck = (bool?) content.GetValueForProperty("PublishingProfileEnableHealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PublishingProfileEnableHealthCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReplicationStatusAggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); + } + if (content.Contains("PackageFileLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PackageFileLink = (string) content.GetValueForProperty("PackageFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).PackageFileLink, global::System.Convert.ToString); + } + if (content.Contains("DefaultConfigFileLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).DefaultConfigFileLink = (string) content.GetValueForProperty("DefaultConfigFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).DefaultConfigFileLink, global::System.Convert.ToString); + } + if (content.Contains("Install")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).Install, global::System.Convert.ToString); + } + if (content.Contains("Remove")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).Remove, global::System.Convert.ToString); + } + if (content.Contains("Update")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).Update, global::System.Convert.ToString); + } + if (content.Contains("SettingPackageFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).SettingPackageFileName = (string) content.GetValueForProperty("SettingPackageFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).SettingPackageFileName, global::System.Convert.ToString); + } + if (content.Contains("SettingConfigFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).SettingConfigFileName = (string) content.GetValueForProperty("SettingConfigFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal)this).SettingConfigFileName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Specifies information about the gallery Application Version that you want to create or update. + [System.ComponentModel.TypeConverter(typeof(GalleryApplicationVersionTypeConverter))] + public partial interface IGalleryApplicationVersion + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersion.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersion.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.TypeConverter.cs index 23c366c3e1dc..b3105929c071 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersion.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryApplicationVersionTypeConverter : global::System.Man { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersion.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.cs similarity index 68% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersion.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.cs index c058a0ceb8b8..dbcad2d3d289 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersion.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 /// Specifies information about the gallery Application Version that you want to create or update. /// public partial class GalleryApplicationVersion : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// @@ -25,7 +25,7 @@ public partial class GalleryApplicationVersion : /// Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string DefaultConfigFileLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).DefaultConfigFileLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).DefaultConfigFileLink = value ?? null; } + public string DefaultConfigFileLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).DefaultConfigFileLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).DefaultConfigFileLink = value ?? null; } /// Resource Id [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] @@ -35,47 +35,50 @@ public partial class GalleryApplicationVersion : /// Required. The path and arguments to install the gallery application. This is limited to 4096 characters. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Install { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).Install; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).Install = value ?? null; } + public string Install { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).Install; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).Install = value ?? null; } /// Resource location [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Location = value ; } + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Type = value; } + /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for PublishingProfile - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal.PublishingProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal.PublishingProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfile = value; } /// Internal Acessors for PublishingProfileManageAction - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal.PublishingProfileManageAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileManageAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileManageAction = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal.PublishingProfileManageAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileManageAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileManageAction = value; } /// Internal Acessors for PublishingProfilePublishedDate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal.PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfilePublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfilePublishedDate = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal.PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfilePublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfilePublishedDate = value; } + + /// Internal Acessors for PublishingProfileSetting + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal.PublishingProfileSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileSetting = value; } /// Internal Acessors for PublishingProfileSource - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal.PublishingProfileSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileSource = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal.PublishingProfileSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileSource = value; } /// Internal Acessors for ReplicationStatus - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal.ReplicationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatus = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal.ReplicationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatus = value; } /// Internal Acessors for ReplicationStatusAggregatedState - Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal.ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusAggregatedState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusAggregatedState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal.ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusAggregatedState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusAggregatedState = value; } /// Internal Acessors for ReplicationStatusSummary - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionInternal.ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusSummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusSummary = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Type = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal.ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusSummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusSummary = value; } /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] @@ -83,74 +86,100 @@ public partial class GalleryApplicationVersion : /// Required. The mediaLink of the artifact, must be a readable storage page blob. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string PackageFileLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PackageFileLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PackageFileLink = value ?? null; } + public string PackageFileLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PackageFileLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PackageFileLink = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties _property; /// Describes the properties of a gallery image version. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionProperties()); set => this._property = value; } /// The provisioning state, which only appears in the response. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ProvisioningState; } + + /// + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings PublishingProfileAdvancedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileAdvancedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileAdvancedSetting = value ?? null /* model class */; } /// Optional. Whether or not this application reports health. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public bool? PublishingProfileEnableHealthCheck { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileEnableHealthCheck; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileEnableHealthCheck = value ?? default(bool); } + public bool? PublishingProfileEnableHealthCheck { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileEnableHealthCheck; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileEnableHealthCheck = value ?? default(bool); } /// /// The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property /// is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public global::System.DateTime? PublishingProfileEndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileEndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileEndOfLifeDate = value ?? default(global::System.DateTime); } + public global::System.DateTime? PublishingProfileEndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileEndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileEndOfLifeDate = value ?? default(global::System.DateTime); } /// /// If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public bool? PublishingProfileExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileExcludeFromLatest; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileExcludeFromLatest = value ?? default(bool); } + public bool? PublishingProfileExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileExcludeFromLatest; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileExcludeFromLatest = value ?? default(bool); } /// The timestamp for when the gallery image version is published. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public global::System.DateTime? PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfilePublishedDate; } + public global::System.DateTime? PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfilePublishedDate; } /// /// Optional parameter which specifies the mode to be used for replication. This property is not updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode? PublishingProfileReplicationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileReplicationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileReplicationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode? PublishingProfileReplicationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileReplicationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileReplicationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); } /// /// Specifies the storage account type to be used to store the image. This property is not updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileStorageAccountType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileStorageAccountType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileStorageAccountType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileStorageAccountType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); } + + /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileTargetExtendedLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileTargetExtendedLocation = value ?? null /* arrayOf */; } /// /// Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Remove { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).Remove; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).Remove = value ?? null; } + public string Remove { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).Remove; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).Remove = value ?? null; } /// /// The number of replicas of the Image Version to be created per region. This property would take effect for a region when /// regionalReplicaCount is not specified. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? ReplicaCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicaCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicaCount = value ?? default(int); } + public int? ReplicaCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicaCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicaCount = value ?? default(int); } /// /// This is the aggregated replication status based on all the regional replication status flags. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusAggregatedState; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusAggregatedState; } /// This is a summary of replication status for each region. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusSummary; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusSummary; } + + /// + /// Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, + /// the config file will be named the Gallery Application name appended with "_config". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string SettingConfigFileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).SettingConfigFileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).SettingConfigFileName = value ?? null; } + + /// + /// Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, + /// the package file will be named the same as the Gallery Application name. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string SettingPackageFileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).SettingPackageFileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).SettingPackageFileName = value ?? null; } /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] @@ -160,7 +189,7 @@ public partial class GalleryApplicationVersion : /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] TargetRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).TargetRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).TargetRegion = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] TargetRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).TargetRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).TargetRegion = value ?? null /* arrayOf */; } /// Resource type [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] @@ -172,7 +201,7 @@ public partial class GalleryApplicationVersion : /// limited to 4096 characters. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Update { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).Update; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).Update = value ?? null; } + public string Update { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).Update; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).Update = value ?? null; } /// Creates an new instance. public GalleryApplicationVersion() @@ -184,7 +213,7 @@ public GalleryApplicationVersion() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { @@ -231,8 +260,18 @@ public partial interface IGalleryApplicationVersion : ReadOnly = true, Description = @"The provisioning state, which only appears in the response.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(string) })] - string ProvisioningState { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; } + /// + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only.", + SerializedName = @"advancedSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings PublishingProfileAdvancedSetting { get; set; } /// Optional. Whether or not this application reports health. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, @@ -291,6 +330,16 @@ public partial interface IGalleryApplicationVersion : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType) })] Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get; set; } /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The target extended locations where the Image Version is going to be replicated to. This property is updatable.", + SerializedName = @"targetExtendedLocations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get; set; } + /// /// Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( @@ -327,8 +376,30 @@ public partial interface IGalleryApplicationVersion : ReadOnly = true, Description = @"This is a summary of replication status for each region.", SerializedName = @"summary", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] ReplicationStatusSummary { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] ReplicationStatusSummary { get; } + /// + /// Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, + /// the config file will be named the Gallery Application name appended with "_config". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with ""_config"".", + SerializedName = @"configFileName", + PossibleTypes = new [] { typeof(string) })] + string SettingConfigFileName { get; set; } + /// + /// Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, + /// the package file will be named the same as the Gallery Application name. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, the package file will be named the same as the Gallery Application name.", + SerializedName = @"packageFileName", + PossibleTypes = new [] { typeof(string) })] + string SettingPackageFileName { get; set; } /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// @@ -337,8 +408,8 @@ public partial interface IGalleryApplicationVersion : ReadOnly = false, Description = @"The target regions where the Image Version is going to be replicated to. This property is updatable.", SerializedName = @"targetRegions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] TargetRegion { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] TargetRegion { get; set; } /// /// Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke /// remove command on the previous version and install command on the current version of the gallery application. This is @@ -368,11 +439,15 @@ internal partial interface IGalleryApplicationVersionInternal : /// Required. The mediaLink of the artifact, must be a readable storage page blob. string PackageFileLink { get; set; } /// Describes the properties of a gallery image version. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties Property { get; set; } /// The provisioning state, which only appears in the response. - string ProvisioningState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; set; } /// The publishing profile of a gallery image version. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile PublishingProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile PublishingProfile { get; set; } + /// + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + /// + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings PublishingProfileAdvancedSetting { get; set; } /// Optional. Whether or not this application reports health. bool? PublishingProfileEnableHealthCheck { get; set; } /// @@ -385,20 +460,29 @@ internal partial interface IGalleryApplicationVersionInternal : /// bool? PublishingProfileExcludeFromLatest { get; set; } - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage PublishingProfileManageAction { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage PublishingProfileManageAction { get; set; } /// The timestamp for when the gallery image version is published. global::System.DateTime? PublishingProfilePublishedDate { get; set; } /// /// Optional parameter which specifies the mode to be used for replication. This property is not updatable. /// Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode? PublishingProfileReplicationMode { get; set; } + /// + /// Additional settings for the VM app that contains the target package and config file name when it is deployed to target + /// VM or VM scale set. + /// + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings PublishingProfileSetting { get; set; } /// The source image from which the Image Version is going to be created. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource PublishingProfileSource { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource PublishingProfileSource { get; set; } /// /// Specifies the storage account type to be used to store the image. This property is not updatable. /// Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get; set; } /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get; set; } + /// /// Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. /// string Remove { get; set; } @@ -408,17 +492,27 @@ internal partial interface IGalleryApplicationVersionInternal : /// int? ReplicaCount { get; set; } /// This is the replication status of the gallery image version. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus ReplicationStatus { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus ReplicationStatus { get; set; } /// /// This is the aggregated replication status based on all the regional replication status flags. /// Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? ReplicationStatusAggregatedState { get; set; } /// This is a summary of replication status for each region. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] ReplicationStatusSummary { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] ReplicationStatusSummary { get; set; } + /// + /// Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, + /// the config file will be named the Gallery Application name appended with "_config". + /// + string SettingConfigFileName { get; set; } + /// + /// Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, + /// the package file will be named the same as the Gallery Application name. + /// + string SettingPackageFileName { get; set; } /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] TargetRegion { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] TargetRegion { get; set; } /// /// Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke /// remove command on the previous version and install command on the current version of the gallery application. This is diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersion.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.json.cs similarity index 91% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersion.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.json.cs index 8a09afe6874d..801c52a2041d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersion.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -22,7 +22,7 @@ public partial class GalleryApplicationVersion partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -32,7 +32,8 @@ public partial class GalleryApplicationVersion /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -44,7 +45,8 @@ public partial class GalleryApplicationVersion /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -54,13 +56,13 @@ public partial class GalleryApplicationVersion partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryApplicationVersion(json) : null; } @@ -78,7 +80,7 @@ internal GalleryApplicationVersion(Microsoft.Azure.PowerShell.Cmdlets.Compute.Ru return; } __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionList.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionList.PowerShell.cs similarity index 69% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionList.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionList.PowerShell.cs index 03224c2a36a6..66d9cf41245b 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionList.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class GalleryApplicationVersionList /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class GalleryApplicationVersionList /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,29 +55,29 @@ public partial class GalleryApplicationVersionList partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GalleryApplicationVersionList(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GalleryApplicationVersionList(content); } @@ -84,11 +86,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGal /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -101,13 +103,19 @@ internal GalleryApplicationVersionList(global::System.Collections.IDictionary co return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionListInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -120,8 +128,14 @@ internal GalleryApplicationVersionList(global::System.Management.Automation.PSOb return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionListInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionList.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionList.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionList.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionList.TypeConverter.cs index 927d820cda06..af462beb8927 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionList.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryApplicationVersionListTypeConverter : global::System { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionList.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionList.cs similarity index 90% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionList.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionList.cs index ab95393aa482..65f595349407 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionList.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionList.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// The List Gallery Application version operation response. public partial class GalleryApplicationVersionList : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionList, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionListInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionList, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionListInternal { /// Backing field for property. @@ -24,11 +24,11 @@ public partial class GalleryApplicationVersionList : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion[] _value; /// A list of gallery Application Versions. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public GalleryApplicationVersionList() @@ -57,8 +57,8 @@ public partial interface IGalleryApplicationVersionList : ReadOnly = false, Description = @"A list of gallery Application Versions.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion[] Value { get; set; } } /// The List Gallery Application version operation response. @@ -71,7 +71,7 @@ internal partial interface IGalleryApplicationVersionListInternal /// string NextLink { get; set; } /// A list of gallery Application Versions. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion[] Value { get; set; } } } \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionList.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionList.json.cs similarity index 89% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionList.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionList.json.cs index fd9c48739555..44c37d1d68a2 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionList.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryApplicationVersionList partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryApplicationVersionList /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryApplicationVersionList /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryApplicationVersionList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionList FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionList FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryApplicationVersionList(json) : null; } @@ -75,7 +77,7 @@ internal GalleryApplicationVersionList(Microsoft.Azure.PowerShell.Cmdlets.Comput { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersion.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersion.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionProperties.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionProperties.PowerShell.cs new file mode 100644 index 000000000000..c6962d68f361 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionProperties.PowerShell.cs @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Describes the properties of a gallery image version. + [System.ComponentModel.TypeConverter(typeof(GalleryApplicationVersionPropertiesTypeConverter))] + public partial class GalleryApplicationVersionProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryApplicationVersionProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryApplicationVersionProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryApplicationVersionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PublishingProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ReplicationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatusTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("PublishingProfileReplicationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); + } + if (content.Contains("ReplicationStatusSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalReplicationStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("TargetRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegionTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PublishingProfileExcludeFromLatest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublishingProfilePublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileEndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileStorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("PublishingProfileTargetExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileTargetExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[]) content.GetValueForProperty("PublishingProfileTargetExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileTargetExtendedLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocationTypeConverter.ConvertFrom)); + } + if (content.Contains("PublishingProfileSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource) content.GetValueForProperty("PublishingProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSourceTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileManageAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileManageAction = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage) content.GetValueForProperty("PublishingProfileManageAction",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileManageAction, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactManageTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileSetting = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings) content.GetValueForProperty("PublishingProfileSetting",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileSetting, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileAdvancedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileAdvancedSetting = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings) content.GetValueForProperty("PublishingProfileAdvancedSetting",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileAdvancedSetting, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfileAdvancedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileEnableHealthCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileEnableHealthCheck = (bool?) content.GetValueForProperty("PublishingProfileEnableHealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileEnableHealthCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReplicationStatusAggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); + } + if (content.Contains("PackageFileLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PackageFileLink = (string) content.GetValueForProperty("PackageFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PackageFileLink, global::System.Convert.ToString); + } + if (content.Contains("DefaultConfigFileLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).DefaultConfigFileLink = (string) content.GetValueForProperty("DefaultConfigFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).DefaultConfigFileLink, global::System.Convert.ToString); + } + if (content.Contains("Install")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).Install, global::System.Convert.ToString); + } + if (content.Contains("Remove")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).Remove, global::System.Convert.ToString); + } + if (content.Contains("Update")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).Update, global::System.Convert.ToString); + } + if (content.Contains("SettingPackageFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).SettingPackageFileName = (string) content.GetValueForProperty("SettingPackageFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).SettingPackageFileName, global::System.Convert.ToString); + } + if (content.Contains("SettingConfigFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).SettingConfigFileName = (string) content.GetValueForProperty("SettingConfigFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).SettingConfigFileName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryApplicationVersionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PublishingProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ReplicationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatusTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("PublishingProfileReplicationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); + } + if (content.Contains("ReplicationStatusSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalReplicationStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("TargetRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegionTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PublishingProfileExcludeFromLatest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublishingProfilePublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileEndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileStorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("PublishingProfileTargetExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileTargetExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[]) content.GetValueForProperty("PublishingProfileTargetExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileTargetExtendedLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocationTypeConverter.ConvertFrom)); + } + if (content.Contains("PublishingProfileSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource) content.GetValueForProperty("PublishingProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSourceTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileManageAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileManageAction = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage) content.GetValueForProperty("PublishingProfileManageAction",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileManageAction, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactManageTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileSetting = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings) content.GetValueForProperty("PublishingProfileSetting",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileSetting, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileAdvancedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileAdvancedSetting = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings) content.GetValueForProperty("PublishingProfileAdvancedSetting",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileAdvancedSetting, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfileAdvancedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileEnableHealthCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileEnableHealthCheck = (bool?) content.GetValueForProperty("PublishingProfileEnableHealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PublishingProfileEnableHealthCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReplicationStatusAggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); + } + if (content.Contains("PackageFileLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PackageFileLink = (string) content.GetValueForProperty("PackageFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).PackageFileLink, global::System.Convert.ToString); + } + if (content.Contains("DefaultConfigFileLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).DefaultConfigFileLink = (string) content.GetValueForProperty("DefaultConfigFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).DefaultConfigFileLink, global::System.Convert.ToString); + } + if (content.Contains("Install")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).Install, global::System.Convert.ToString); + } + if (content.Contains("Remove")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).Remove, global::System.Convert.ToString); + } + if (content.Contains("Update")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).Update, global::System.Convert.ToString); + } + if (content.Contains("SettingPackageFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).SettingPackageFileName = (string) content.GetValueForProperty("SettingPackageFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).SettingPackageFileName, global::System.Convert.ToString); + } + if (content.Contains("SettingConfigFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).SettingConfigFileName = (string) content.GetValueForProperty("SettingConfigFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)this).SettingConfigFileName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Describes the properties of a gallery image version. + [System.ComponentModel.TypeConverter(typeof(GalleryApplicationVersionPropertiesTypeConverter))] + public partial interface IGalleryApplicationVersionProperties + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionProperties.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionProperties.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionProperties.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionProperties.TypeConverter.cs index 8a035e92ab49..35558b078bbc 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionProperties.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryApplicationVersionPropertiesTypeConverter : global:: { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -76,19 +76,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -100,21 +101,21 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionProperties.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionProperties.cs similarity index 65% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionProperties.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionProperties.cs index 61fa82387f06..2770da90d05e 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionProperties.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionProperties.cs @@ -3,138 +3,167 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// Describes the properties of a gallery image version. public partial class GalleryApplicationVersionProperties : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal { /// /// Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string DefaultConfigFileLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).DefaultConfigFileLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).DefaultConfigFileLink = value ?? null; } + public string DefaultConfigFileLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).DefaultConfigFileLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).DefaultConfigFileLink = value ?? null; } /// /// Required. The path and arguments to install the gallery application. This is limited to 4096 characters. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Install { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).Install; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).Install = value ?? null; } + public string Install { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).Install; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).Install = value ?? null; } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for PublishingProfile - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal.PublishingProfile { get => (this._publishingProfile = this._publishingProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionPublishingProfile()); set { {_publishingProfile = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal.PublishingProfile { get => (this._publishingProfile = this._publishingProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfile()); set { {_publishingProfile = value;} } } /// Internal Acessors for PublishingProfileManageAction - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal.PublishingProfileManageAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).ManageAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).ManageAction = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal.PublishingProfileManageAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).ManageAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).ManageAction = value; } /// Internal Acessors for PublishingProfilePublishedDate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal.PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).PublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).PublishedDate = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal.PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).PublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).PublishedDate = value; } + + /// Internal Acessors for PublishingProfileSetting + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal.PublishingProfileSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).Setting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).Setting = value; } /// Internal Acessors for PublishingProfileSource - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal.PublishingProfileSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).Source; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).Source = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal.PublishingProfileSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).Source; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).Source = value; } /// Internal Acessors for ReplicationStatus - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal.ReplicationStatus { get => (this._replicationStatus = this._replicationStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatus()); set { {_replicationStatus = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal.ReplicationStatus { get => (this._replicationStatus = this._replicationStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatus()); set { {_replicationStatus = value;} } } /// Internal Acessors for ReplicationStatusAggregatedState - Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal.ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)ReplicationStatus).AggregatedState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)ReplicationStatus).AggregatedState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal.ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)ReplicationStatus).AggregatedState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)ReplicationStatus).AggregatedState = value; } /// Internal Acessors for ReplicationStatusSummary - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal.ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)ReplicationStatus).Summary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)ReplicationStatus).Summary = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal.ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)ReplicationStatus).Summary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)ReplicationStatus).Summary = value; } /// Required. The mediaLink of the artifact, must be a readable storage page blob. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string PackageFileLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).PackageFileLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).PackageFileLink = value ; } + public string PackageFileLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).PackageFileLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).PackageFileLink = value ; } /// Backing field for property. - private string _provisioningState; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? _provisioningState; /// The provisioning state, which only appears in the response. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - public string ProvisioningState { get => this._provisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get => this._provisioningState; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile _publishingProfile; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile _publishingProfile; /// The publishing profile of a gallery image version. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile PublishingProfile { get => (this._publishingProfile = this._publishingProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionPublishingProfile()); set => this._publishingProfile = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile PublishingProfile { get => (this._publishingProfile = this._publishingProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfile()); set => this._publishingProfile = value; } + + /// + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings PublishingProfileAdvancedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).AdvancedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).AdvancedSetting = value ?? null /* model class */; } /// Optional. Whether or not this application reports health. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public bool? PublishingProfileEnableHealthCheck { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).EnableHealthCheck; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).EnableHealthCheck = value ?? default(bool); } + public bool? PublishingProfileEnableHealthCheck { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).EnableHealthCheck; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).EnableHealthCheck = value ?? default(bool); } /// /// The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property /// is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public global::System.DateTime? PublishingProfileEndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).EndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).EndOfLifeDate = value ?? default(global::System.DateTime); } + public global::System.DateTime? PublishingProfileEndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).EndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).EndOfLifeDate = value ?? default(global::System.DateTime); } /// /// If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public bool? PublishingProfileExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ExcludeFromLatest; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ExcludeFromLatest = value ?? default(bool); } + public bool? PublishingProfileExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ExcludeFromLatest; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ExcludeFromLatest = value ?? default(bool); } /// The timestamp for when the gallery image version is published. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public global::System.DateTime? PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).PublishedDate; } + public global::System.DateTime? PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).PublishedDate; } /// /// Optional parameter which specifies the mode to be used for replication. This property is not updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode? PublishingProfileReplicationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ReplicationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ReplicationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode? PublishingProfileReplicationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ReplicationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ReplicationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); } /// /// Specifies the storage account type to be used to store the image. This property is not updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).StorageAccountType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).StorageAccountType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).StorageAccountType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).StorageAccountType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); } + + /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).TargetExtendedLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).TargetExtendedLocation = value ?? null /* arrayOf */; } /// /// Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Remove { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).Remove; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).Remove = value ?? null; } + public string Remove { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).Remove; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).Remove = value ?? null; } /// /// The number of replicas of the Image Version to be created per region. This property would take effect for a region when /// regionalReplicaCount is not specified. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? ReplicaCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ReplicaCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ReplicaCount = value ?? default(int); } + public int? ReplicaCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ReplicaCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ReplicaCount = value ?? default(int); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus _replicationStatus; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus _replicationStatus; /// This is the replication status of the gallery image version. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus ReplicationStatus { get => (this._replicationStatus = this._replicationStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatus()); } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus ReplicationStatus { get => (this._replicationStatus = this._replicationStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatus()); } /// /// This is the aggregated replication status based on all the regional replication status flags. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)ReplicationStatus).AggregatedState; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)ReplicationStatus).AggregatedState; } /// This is a summary of replication status for each region. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)ReplicationStatus).Summary; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)ReplicationStatus).Summary; } + + /// + /// Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, + /// the config file will be named the Gallery Application name appended with "_config". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string SettingConfigFileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).SettingConfigFileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).SettingConfigFileName = value ?? null; } + + /// + /// Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, + /// the package file will be named the same as the Gallery Application name. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string SettingPackageFileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).SettingPackageFileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).SettingPackageFileName = value ?? null; } /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] TargetRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).TargetRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).TargetRegion = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] TargetRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).TargetRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).TargetRegion = value ?? null /* arrayOf */; } /// /// Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke @@ -142,7 +171,7 @@ public partial class GalleryApplicationVersionProperties : /// limited to 4096 characters. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Update { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).Update; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).Update = value ?? null; } + public string Update { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).Update; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)PublishingProfile).Update = value ?? null; } /// Creates an new instance. public GalleryApplicationVersionProperties() @@ -188,8 +217,18 @@ public partial interface IGalleryApplicationVersionProperties : ReadOnly = true, Description = @"The provisioning state, which only appears in the response.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(string) })] - string ProvisioningState { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; } + /// + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only.", + SerializedName = @"advancedSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings PublishingProfileAdvancedSetting { get; set; } /// Optional. Whether or not this application reports health. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, @@ -248,6 +287,16 @@ public partial interface IGalleryApplicationVersionProperties : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType) })] Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get; set; } /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The target extended locations where the Image Version is going to be replicated to. This property is updatable.", + SerializedName = @"targetExtendedLocations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get; set; } + /// /// Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( @@ -284,8 +333,30 @@ public partial interface IGalleryApplicationVersionProperties : ReadOnly = true, Description = @"This is a summary of replication status for each region.", SerializedName = @"summary", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] ReplicationStatusSummary { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] ReplicationStatusSummary { get; } + /// + /// Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, + /// the config file will be named the Gallery Application name appended with "_config". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with ""_config"".", + SerializedName = @"configFileName", + PossibleTypes = new [] { typeof(string) })] + string SettingConfigFileName { get; set; } + /// + /// Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, + /// the package file will be named the same as the Gallery Application name. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, the package file will be named the same as the Gallery Application name.", + SerializedName = @"packageFileName", + PossibleTypes = new [] { typeof(string) })] + string SettingPackageFileName { get; set; } /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// @@ -294,8 +365,8 @@ public partial interface IGalleryApplicationVersionProperties : ReadOnly = false, Description = @"The target regions where the Image Version is going to be replicated to. This property is updatable.", SerializedName = @"targetRegions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] TargetRegion { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] TargetRegion { get; set; } /// /// Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke /// remove command on the previous version and install command on the current version of the gallery application. This is @@ -325,9 +396,13 @@ internal partial interface IGalleryApplicationVersionPropertiesInternal /// Required. The mediaLink of the artifact, must be a readable storage page blob. string PackageFileLink { get; set; } /// The provisioning state, which only appears in the response. - string ProvisioningState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; set; } /// The publishing profile of a gallery image version. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile PublishingProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile PublishingProfile { get; set; } + /// + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + /// + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings PublishingProfileAdvancedSetting { get; set; } /// Optional. Whether or not this application reports health. bool? PublishingProfileEnableHealthCheck { get; set; } /// @@ -340,20 +415,29 @@ internal partial interface IGalleryApplicationVersionPropertiesInternal /// bool? PublishingProfileExcludeFromLatest { get; set; } - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage PublishingProfileManageAction { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage PublishingProfileManageAction { get; set; } /// The timestamp for when the gallery image version is published. global::System.DateTime? PublishingProfilePublishedDate { get; set; } /// /// Optional parameter which specifies the mode to be used for replication. This property is not updatable. /// Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode? PublishingProfileReplicationMode { get; set; } + /// + /// Additional settings for the VM app that contains the target package and config file name when it is deployed to target + /// VM or VM scale set. + /// + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings PublishingProfileSetting { get; set; } /// The source image from which the Image Version is going to be created. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource PublishingProfileSource { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource PublishingProfileSource { get; set; } /// /// Specifies the storage account type to be used to store the image. This property is not updatable. /// Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get; set; } /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get; set; } + /// /// Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. /// string Remove { get; set; } @@ -363,17 +447,27 @@ internal partial interface IGalleryApplicationVersionPropertiesInternal /// int? ReplicaCount { get; set; } /// This is the replication status of the gallery image version. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus ReplicationStatus { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus ReplicationStatus { get; set; } /// /// This is the aggregated replication status based on all the regional replication status flags. /// Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? ReplicationStatusAggregatedState { get; set; } /// This is a summary of replication status for each region. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] ReplicationStatusSummary { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] ReplicationStatusSummary { get; set; } + /// + /// Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, + /// the config file will be named the Gallery Application name appended with "_config". + /// + string SettingConfigFileName { get; set; } + /// + /// Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, + /// the package file will be named the same as the Gallery Application name. + /// + string SettingPackageFileName { get; set; } /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] TargetRegion { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] TargetRegion { get; set; } /// /// Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke /// remove command on the previous version and install command on the current version of the gallery application. This is diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionProperties.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionProperties.json.cs similarity index 91% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionProperties.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionProperties.json.cs index bd4d8d58c11f..3d861b1d95d1 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionProperties.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryApplicationVersionProperties partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryApplicationVersionProperties /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryApplicationVersionProperties /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryApplicationVersionProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryApplicationVersionProperties(json) : null; } @@ -75,8 +77,8 @@ internal GalleryApplicationVersionProperties(Microsoft.Azure.PowerShell.Cmdlets. { return; } - {_publishingProfile = If( json?.PropertyT("publishingProfile"), out var __jsonPublishingProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionPublishingProfile.FromJson(__jsonPublishingProfile) : PublishingProfile;} - {_replicationStatus = If( json?.PropertyT("replicationStatus"), out var __jsonReplicationStatus) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatus.FromJson(__jsonReplicationStatus) : ReplicationStatus;} + {_publishingProfile = If( json?.PropertyT("publishingProfile"), out var __jsonPublishingProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfile.FromJson(__jsonPublishingProfile) : PublishingProfile;} + {_replicationStatus = If( json?.PropertyT("replicationStatus"), out var __jsonReplicationStatus) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatus.FromJson(__jsonReplicationStatus) : ReplicationStatus;} {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfile.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfile.PowerShell.cs new file mode 100644 index 000000000000..61483581df4d --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfile.PowerShell.cs @@ -0,0 +1,301 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// The publishing profile of a gallery image version. + [System.ComponentModel.TypeConverter(typeof(GalleryApplicationVersionPublishingProfileTypeConverter))] + public partial class GalleryApplicationVersionPublishingProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryApplicationVersionPublishingProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryApplicationVersionPublishingProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a + /// json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryApplicationVersionPublishingProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSourceTypeConverter.ConvertFrom); + } + if (content.Contains("ManageAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).ManageAction = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage) content.GetValueForProperty("ManageAction",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).ManageAction, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactManageTypeConverter.ConvertFrom); + } + if (content.Contains("Setting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Setting = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings) content.GetValueForProperty("Setting",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Setting, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("AdvancedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).AdvancedSetting = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings) content.GetValueForProperty("AdvancedSetting",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).AdvancedSetting, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfileAdvancedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("EnableHealthCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).EnableHealthCheck = (bool?) content.GetValueForProperty("EnableHealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).EnableHealthCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("TargetRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegionTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ExcludeFromLatest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("StorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("ReplicationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("ReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); + } + if (content.Contains("TargetExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[]) content.GetValueForProperty("TargetExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetExtendedLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocationTypeConverter.ConvertFrom)); + } + if (content.Contains("PackageFileLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).PackageFileLink = (string) content.GetValueForProperty("PackageFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).PackageFileLink, global::System.Convert.ToString); + } + if (content.Contains("DefaultConfigFileLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).DefaultConfigFileLink = (string) content.GetValueForProperty("DefaultConfigFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).DefaultConfigFileLink, global::System.Convert.ToString); + } + if (content.Contains("Install")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Install, global::System.Convert.ToString); + } + if (content.Contains("Remove")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Remove, global::System.Convert.ToString); + } + if (content.Contains("Update")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Update, global::System.Convert.ToString); + } + if (content.Contains("SettingPackageFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).SettingPackageFileName = (string) content.GetValueForProperty("SettingPackageFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).SettingPackageFileName, global::System.Convert.ToString); + } + if (content.Contains("SettingConfigFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).SettingConfigFileName = (string) content.GetValueForProperty("SettingConfigFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).SettingConfigFileName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryApplicationVersionPublishingProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSourceTypeConverter.ConvertFrom); + } + if (content.Contains("ManageAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).ManageAction = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage) content.GetValueForProperty("ManageAction",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).ManageAction, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactManageTypeConverter.ConvertFrom); + } + if (content.Contains("Setting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Setting = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings) content.GetValueForProperty("Setting",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Setting, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("AdvancedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).AdvancedSetting = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings) content.GetValueForProperty("AdvancedSetting",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).AdvancedSetting, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfileAdvancedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("EnableHealthCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).EnableHealthCheck = (bool?) content.GetValueForProperty("EnableHealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).EnableHealthCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("TargetRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegionTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ExcludeFromLatest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("StorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("ReplicationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("ReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); + } + if (content.Contains("TargetExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[]) content.GetValueForProperty("TargetExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetExtendedLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocationTypeConverter.ConvertFrom)); + } + if (content.Contains("PackageFileLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).PackageFileLink = (string) content.GetValueForProperty("PackageFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).PackageFileLink, global::System.Convert.ToString); + } + if (content.Contains("DefaultConfigFileLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).DefaultConfigFileLink = (string) content.GetValueForProperty("DefaultConfigFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).DefaultConfigFileLink, global::System.Convert.ToString); + } + if (content.Contains("Install")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Install, global::System.Convert.ToString); + } + if (content.Contains("Remove")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Remove, global::System.Convert.ToString); + } + if (content.Contains("Update")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).Update, global::System.Convert.ToString); + } + if (content.Contains("SettingPackageFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).SettingPackageFileName = (string) content.GetValueForProperty("SettingPackageFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).SettingPackageFileName, global::System.Convert.ToString); + } + if (content.Contains("SettingConfigFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).SettingConfigFileName = (string) content.GetValueForProperty("SettingConfigFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal)this).SettingConfigFileName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The publishing profile of a gallery image version. + [System.ComponentModel.TypeConverter(typeof(GalleryApplicationVersionPublishingProfileTypeConverter))] + public partial interface IGalleryApplicationVersionPublishingProfile + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionPublishingProfile.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfile.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionPublishingProfile.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfile.TypeConverter.cs index 33311a4abcc8..3bb8242acd22 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionPublishingProfile.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -15,20 +15,20 @@ public partial class GalleryApplicationVersionPublishingProfileTypeConverter : g { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -77,19 +77,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -101,22 +102,22 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionPublishingProfile.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfile.cs similarity index 59% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionPublishingProfile.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfile.cs index 7821bcb99bda..08b6d2f1b1b9 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionPublishingProfile.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfile.cs @@ -3,27 +3,36 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// The publishing profile of a gallery image version. public partial class GalleryApplicationVersionPublishingProfile : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase __galleryArtifactPublishingProfileBase = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactPublishingProfileBase(); + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase __galleryArtifactPublishingProfileBase = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactPublishingProfileBase(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings _advancedSetting; + + /// + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings AdvancedSetting { get => (this._advancedSetting = this._advancedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfileAdvancedSettings()); set => this._advancedSetting = value; } /// /// Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string DefaultConfigFileLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSourceInternal)Source).DefaultConfigurationLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSourceInternal)Source).DefaultConfigurationLink = value ?? null; } + public string DefaultConfigFileLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSourceInternal)Source).DefaultConfigurationLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSourceInternal)Source).DefaultConfigurationLink = value ?? null; } /// Backing field for property. private bool? _enableHealthCheck; @@ -37,80 +46,113 @@ public partial class GalleryApplicationVersionPublishingProfile : /// is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public global::System.DateTime? EndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).EndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).EndOfLifeDate = value ?? default(global::System.DateTime); } + public global::System.DateTime? EndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).EndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).EndOfLifeDate = value ?? default(global::System.DateTime); } /// /// If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public bool? ExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ExcludeFromLatest; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ExcludeFromLatest = value ?? default(bool); } + public bool? ExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ExcludeFromLatest; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ExcludeFromLatest = value ?? default(bool); } /// /// Required. The path and arguments to install the gallery application. This is limited to 4096 characters. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Install { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManageInternal)ManageAction).Install; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManageInternal)ManageAction).Install = value ?? null; } + public string Install { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManageInternal)ManageAction).Install; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManageInternal)ManageAction).Install = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage _manageAction; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage _manageAction; [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage ManageAction { get => (this._manageAction = this._manageAction ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactManage()); set => this._manageAction = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage ManageAction { get => (this._manageAction = this._manageAction ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactManage()); set => this._manageAction = value; } /// Internal Acessors for ManageAction - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal.ManageAction { get => (this._manageAction = this._manageAction ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactManage()); set { {_manageAction = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal.ManageAction { get => (this._manageAction = this._manageAction ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactManage()); set { {_manageAction = value;} } } + + /// Internal Acessors for Setting + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal.Setting { get => (this._setting = this._setting ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSettings()); set { {_setting = value;} } } /// Internal Acessors for Source - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfileInternal.Source { get => (this._source = this._source ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactSource()); set { {_source = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileInternal.Source { get => (this._source = this._source ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSource()); set { {_source = value;} } } /// Internal Acessors for PublishedDate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal.PublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).PublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).PublishedDate = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal.PublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).PublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).PublishedDate = value; } /// Required. The mediaLink of the artifact, must be a readable storage page blob. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string PackageFileLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSourceInternal)Source).MediaLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSourceInternal)Source).MediaLink = value ; } + public string PackageFileLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSourceInternal)Source).MediaLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSourceInternal)Source).MediaLink = value ; } /// The timestamp for when the gallery image version is published. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public global::System.DateTime? PublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).PublishedDate; } + public global::System.DateTime? PublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).PublishedDate; } /// /// Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Remove { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManageInternal)ManageAction).Remove; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManageInternal)ManageAction).Remove = value ?? null; } + public string Remove { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManageInternal)ManageAction).Remove; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManageInternal)ManageAction).Remove = value ?? null; } /// /// The number of replicas of the Image Version to be created per region. This property would take effect for a region when /// regionalReplicaCount is not specified. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public int? ReplicaCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ReplicaCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ReplicaCount = value ?? default(int); } + public int? ReplicaCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ReplicaCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ReplicaCount = value ?? default(int); } /// /// Optional parameter which specifies the mode to be used for replication. This property is not updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode? ReplicationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ReplicationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ReplicationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode? ReplicationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ReplicationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ReplicationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings _setting; + + /// + /// Additional settings for the VM app that contains the target package and config file name when it is deployed to target + /// VM or VM scale set. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings Setting { get => (this._setting = this._setting ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSettings()); set => this._setting = value; } + + /// + /// Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, + /// the config file will be named the Gallery Application name appended with "_config". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string SettingConfigFileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettingsInternal)Setting).ConfigFileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettingsInternal)Setting).ConfigFileName = value ?? null; } + + /// + /// Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, + /// the package file will be named the same as the Gallery Application name. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string SettingPackageFileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettingsInternal)Setting).PackageFileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettingsInternal)Setting).PackageFileName = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource _source; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource _source; /// The source image from which the Image Version is going to be created. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource Source { get => (this._source = this._source ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactSource()); set => this._source = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource Source { get => (this._source = this._source ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSource()); set => this._source = value; } /// /// Specifies the storage account type to be used to store the image. This property is not updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? StorageAccountType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).StorageAccountType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).StorageAccountType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? StorageAccountType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).StorageAccountType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).StorageAccountType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); } + + /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] TargetExtendedLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).TargetExtendedLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).TargetExtendedLocation = value ?? null /* arrayOf */; } /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] TargetRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).TargetRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).TargetRegion = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] TargetRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).TargetRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).TargetRegion = value ?? null /* arrayOf */; } /// /// Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke @@ -118,7 +160,7 @@ public partial class GalleryApplicationVersionPublishingProfile : /// limited to 4096 characters. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Update { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManageInternal)ManageAction).Update; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManageInternal)ManageAction).Update = value ?? null; } + public string Update { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManageInternal)ManageAction).Update; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManageInternal)ManageAction).Update = value ?? null; } /// /// Creates an new instance. @@ -132,7 +174,7 @@ public GalleryApplicationVersionPublishingProfile() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { @@ -143,8 +185,18 @@ public GalleryApplicationVersionPublishingProfile() /// The publishing profile of a gallery image version. public partial interface IGalleryApplicationVersionPublishingProfile : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase { + /// + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only.", + SerializedName = @"advancedSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings AdvancedSetting { get; set; } /// /// Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. /// @@ -192,6 +244,28 @@ public partial interface IGalleryApplicationVersionPublishingProfile : PossibleTypes = new [] { typeof(string) })] string Remove { get; set; } /// + /// Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, + /// the config file will be named the Gallery Application name appended with "_config". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with ""_config"".", + SerializedName = @"configFileName", + PossibleTypes = new [] { typeof(string) })] + string SettingConfigFileName { get; set; } + /// + /// Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, + /// the package file will be named the same as the Gallery Application name. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, the package file will be named the same as the Gallery Application name.", + SerializedName = @"packageFileName", + PossibleTypes = new [] { typeof(string) })] + string SettingPackageFileName { get; set; } + /// /// Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke /// remove command on the previous version and install command on the current version of the gallery application. This is /// limited to 4096 characters. @@ -207,8 +281,12 @@ public partial interface IGalleryApplicationVersionPublishingProfile : } /// The publishing profile of a gallery image version. internal partial interface IGalleryApplicationVersionPublishingProfileInternal : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal { + /// + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + /// + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings AdvancedSetting { get; set; } /// /// Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. /// @@ -220,15 +298,30 @@ internal partial interface IGalleryApplicationVersionPublishingProfileInternal : /// string Install { get; set; } - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage ManageAction { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage ManageAction { get; set; } /// Required. The mediaLink of the artifact, must be a readable storage page blob. string PackageFileLink { get; set; } /// /// Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. /// string Remove { get; set; } + /// + /// Additional settings for the VM app that contains the target package and config file name when it is deployed to target + /// VM or VM scale set. + /// + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings Setting { get; set; } + /// + /// Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, + /// the config file will be named the Gallery Application name appended with "_config". + /// + string SettingConfigFileName { get; set; } + /// + /// Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, + /// the package file will be named the same as the Gallery Application name. + /// + string SettingPackageFileName { get; set; } /// The source image from which the Image Version is going to be created. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource Source { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource Source { get; set; } /// /// Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke /// remove command on the previous version and install command on the current version of the gallery application. This is diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionPublishingProfile.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfile.json.cs similarity index 80% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionPublishingProfile.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfile.json.cs index 1cad8f5ca079..90532d697ccf 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionPublishingProfile.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryApplicationVersionPublishingProfile partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryApplicationVersionPublishingProfile /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryApplicationVersionPublishingProfile /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryApplicationVersionPublishingProfile partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryApplicationVersionPublishingProfile(json) : null; } @@ -75,9 +77,11 @@ internal GalleryApplicationVersionPublishingProfile(Microsoft.Azure.PowerShell.C { return; } - __galleryArtifactPublishingProfileBase = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactPublishingProfileBase(json); - {_source = If( json?.PropertyT("source"), out var __jsonSource) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactSource.FromJson(__jsonSource) : Source;} - {_manageAction = If( json?.PropertyT("manageActions"), out var __jsonManageActions) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UserArtifactManage.FromJson(__jsonManageActions) : ManageAction;} + __galleryArtifactPublishingProfileBase = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactPublishingProfileBase(json); + {_source = If( json?.PropertyT("source"), out var __jsonSource) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSource.FromJson(__jsonSource) : Source;} + {_manageAction = If( json?.PropertyT("manageActions"), out var __jsonManageActions) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactManage.FromJson(__jsonManageActions) : ManageAction;} + {_setting = If( json?.PropertyT("settings"), out var __jsonSettings) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSettings.FromJson(__jsonSettings) : Setting;} + {_advancedSetting = If( json?.PropertyT("advancedSettings"), out var __jsonAdvancedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfileAdvancedSettings.FromJson(__jsonAdvancedSettings) : AdvancedSetting;} {_enableHealthCheck = If( json?.PropertyT("enableHealthCheck"), out var __jsonEnableHealthCheck) ? (bool?)__jsonEnableHealthCheck : EnableHealthCheck;} AfterFromJson(json); } @@ -106,6 +110,8 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode ToJson(M __galleryArtifactPublishingProfileBase?.ToJson(container, serializationMode); AddIf( null != this._source ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) this._source.ToJson(null,serializationMode) : null, "source" ,container.Add ); AddIf( null != this._manageAction ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) this._manageAction.ToJson(null,serializationMode) : null, "manageActions" ,container.Add ); + AddIf( null != this._setting ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) this._setting.ToJson(null,serializationMode) : null, "settings" ,container.Add ); + AddIf( null != this._advancedSetting ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) this._advancedSetting.ToJson(null,serializationMode) : null, "advancedSettings" ,container.Add ); AddIf( null != this._enableHealthCheck ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonBoolean((bool)this._enableHealthCheck) : null, "enableHealthCheck" ,container.Add ); AfterToJson(ref container); return container; diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfileAdvancedSettings.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfileAdvancedSettings.PowerShell.cs new file mode 100644 index 000000000000..ee90b26d7b6d --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfileAdvancedSettings.PowerShell.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + /// + [System.ComponentModel.TypeConverter(typeof(GalleryApplicationVersionPublishingProfileAdvancedSettingsTypeConverter))] + public partial class GalleryApplicationVersionPublishingProfileAdvancedSettings + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryApplicationVersionPublishingProfileAdvancedSettings(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryApplicationVersionPublishingProfileAdvancedSettings(content); + } + + /// + /// Creates a new instance of , deserializing the + /// content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryApplicationVersionPublishingProfileAdvancedSettings(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryApplicationVersionPublishingProfileAdvancedSettings(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + [System.ComponentModel.TypeConverter(typeof(GalleryApplicationVersionPublishingProfileAdvancedSettingsTypeConverter))] + public partial interface IGalleryApplicationVersionPublishingProfileAdvancedSettings + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfileAdvancedSettings.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfileAdvancedSettings.TypeConverter.cs new file mode 100644 index 000000000000..f96a9fc66901 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfileAdvancedSettings.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class GalleryApplicationVersionPublishingProfileAdvancedSettingsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no + /// suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no + /// suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return GalleryApplicationVersionPublishingProfileAdvancedSettings.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return GalleryApplicationVersionPublishingProfileAdvancedSettings.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return GalleryApplicationVersionPublishingProfileAdvancedSettings.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfileAdvancedSettings.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfileAdvancedSettings.cs new file mode 100644 index 000000000000..7cbc2a3f593d --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfileAdvancedSettings.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + /// + public partial class GalleryApplicationVersionPublishingProfileAdvancedSettings : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettingsInternal + { + + /// + /// Creates an new instance. + /// + public GalleryApplicationVersionPublishingProfileAdvancedSettings() + { + + } + } + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + public partial interface IGalleryApplicationVersionPublishingProfileAdvancedSettings : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IAssociativeArray + { + + } + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + internal partial interface IGalleryApplicationVersionPublishingProfileAdvancedSettingsInternal + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfileAdvancedSettings.dictionary.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfileAdvancedSettings.dictionary.cs new file mode 100644 index 000000000000..409e121af587 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfileAdvancedSettings.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + public partial class GalleryApplicationVersionPublishingProfileAdvancedSettings : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfileAdvancedSettings source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfileAdvancedSettings.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfileAdvancedSettings.json.cs new file mode 100644 index 000000000000..b239b56d4e23 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionPublishingProfileAdvancedSettings.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + /// + public partial class GalleryApplicationVersionPublishingProfileAdvancedSettings + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryApplicationVersionPublishingProfileAdvancedSettings(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + /// + internal GalleryApplicationVersionPublishingProfileAdvancedSettings(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionUpdate.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionUpdate.PowerShell.cs new file mode 100644 index 000000000000..73ceffc2de12 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionUpdate.PowerShell.cs @@ -0,0 +1,380 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// Specifies information about the gallery Application Version that you want to update. + /// + [System.ComponentModel.TypeConverter(typeof(GalleryApplicationVersionUpdateTypeConverter))] + public partial class GalleryApplicationVersionUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryApplicationVersionUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryApplicationVersionUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryApplicationVersionUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); + } + if (content.Contains("ReplicationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatusTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("PublishingProfileReplicationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); + } + if (content.Contains("ReplicationStatusSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalReplicationStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("TargetRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegionTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PublishingProfileExcludeFromLatest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublishingProfilePublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileEndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileStorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("PublishingProfileTargetExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileTargetExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[]) content.GetValueForProperty("PublishingProfileTargetExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileTargetExtendedLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocationTypeConverter.ConvertFrom)); + } + if (content.Contains("PublishingProfileSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource) content.GetValueForProperty("PublishingProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSourceTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileManageAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileManageAction = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage) content.GetValueForProperty("PublishingProfileManageAction",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileManageAction, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactManageTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileSetting = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings) content.GetValueForProperty("PublishingProfileSetting",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileSetting, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileAdvancedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileAdvancedSetting = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings) content.GetValueForProperty("PublishingProfileAdvancedSetting",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileAdvancedSetting, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfileAdvancedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileEnableHealthCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileEnableHealthCheck = (bool?) content.GetValueForProperty("PublishingProfileEnableHealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileEnableHealthCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReplicationStatusAggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); + } + if (content.Contains("PackageFileLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PackageFileLink = (string) content.GetValueForProperty("PackageFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PackageFileLink, global::System.Convert.ToString); + } + if (content.Contains("DefaultConfigFileLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).DefaultConfigFileLink = (string) content.GetValueForProperty("DefaultConfigFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).DefaultConfigFileLink, global::System.Convert.ToString); + } + if (content.Contains("Install")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).Install, global::System.Convert.ToString); + } + if (content.Contains("Remove")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).Remove, global::System.Convert.ToString); + } + if (content.Contains("Update")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).Update, global::System.Convert.ToString); + } + if (content.Contains("SettingPackageFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).SettingPackageFileName = (string) content.GetValueForProperty("SettingPackageFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).SettingPackageFileName, global::System.Convert.ToString); + } + if (content.Contains("SettingConfigFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).SettingConfigFileName = (string) content.GetValueForProperty("SettingConfigFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).SettingConfigFileName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryApplicationVersionUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); + } + if (content.Contains("ReplicationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatusTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("PublishingProfileReplicationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); + } + if (content.Contains("ReplicationStatusSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalReplicationStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("TargetRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegionTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PublishingProfileExcludeFromLatest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublishingProfilePublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileEndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileStorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("PublishingProfileTargetExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileTargetExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[]) content.GetValueForProperty("PublishingProfileTargetExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileTargetExtendedLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocationTypeConverter.ConvertFrom)); + } + if (content.Contains("PublishingProfileSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource) content.GetValueForProperty("PublishingProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSourceTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileManageAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileManageAction = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage) content.GetValueForProperty("PublishingProfileManageAction",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileManageAction, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactManageTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileSetting = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings) content.GetValueForProperty("PublishingProfileSetting",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileSetting, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UserArtifactSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileAdvancedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileAdvancedSetting = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings) content.GetValueForProperty("PublishingProfileAdvancedSetting",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileAdvancedSetting, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionPublishingProfileAdvancedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfileEnableHealthCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileEnableHealthCheck = (bool?) content.GetValueForProperty("PublishingProfileEnableHealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PublishingProfileEnableHealthCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReplicationStatusAggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); + } + if (content.Contains("PackageFileLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PackageFileLink = (string) content.GetValueForProperty("PackageFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).PackageFileLink, global::System.Convert.ToString); + } + if (content.Contains("DefaultConfigFileLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).DefaultConfigFileLink = (string) content.GetValueForProperty("DefaultConfigFileLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).DefaultConfigFileLink, global::System.Convert.ToString); + } + if (content.Contains("Install")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).Install, global::System.Convert.ToString); + } + if (content.Contains("Remove")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).Remove, global::System.Convert.ToString); + } + if (content.Contains("Update")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).Update, global::System.Convert.ToString); + } + if (content.Contains("SettingPackageFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).SettingPackageFileName = (string) content.GetValueForProperty("SettingPackageFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).SettingPackageFileName, global::System.Convert.ToString); + } + if (content.Contains("SettingConfigFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).SettingConfigFileName = (string) content.GetValueForProperty("SettingConfigFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal)this).SettingConfigFileName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Specifies information about the gallery Application Version that you want to update. + [System.ComponentModel.TypeConverter(typeof(GalleryApplicationVersionUpdateTypeConverter))] + public partial interface IGalleryApplicationVersionUpdate + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionUpdate.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionUpdate.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionUpdate.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionUpdate.TypeConverter.cs index 80f59af5b977..c90f4a32d8e8 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionUpdate.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryApplicationVersionUpdateTypeConverter : global::Syst { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,21 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionUpdate.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionUpdate.cs similarity index 65% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionUpdate.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionUpdate.cs index 43e3a0ea9c40..2296aafb24ce 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionUpdate.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionUpdate.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -11,156 +11,185 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 /// Specifies information about the gallery Application Version that you want to update. /// public partial class GalleryApplicationVersionUpdate : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdate, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinition __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinition(); + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinition __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinition(); /// /// Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string DefaultConfigFileLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).DefaultConfigFileLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).DefaultConfigFileLink = value ?? null; } + public string DefaultConfigFileLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).DefaultConfigFileLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).DefaultConfigFileLink = value ?? null; } /// Resource Id [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; } /// /// Required. The path and arguments to install the gallery application. This is limited to 4096 characters. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Install { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).Install; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).Install = value ?? null; } + public string Install { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).Install; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).Install = value ?? null; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for PublishingProfile - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal.PublishingProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal.PublishingProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfile = value; } /// Internal Acessors for PublishingProfileManageAction - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal.PublishingProfileManageAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileManageAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileManageAction = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal.PublishingProfileManageAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileManageAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileManageAction = value; } /// Internal Acessors for PublishingProfilePublishedDate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal.PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfilePublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfilePublishedDate = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal.PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfilePublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfilePublishedDate = value; } + + /// Internal Acessors for PublishingProfileSetting + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal.PublishingProfileSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileSetting = value; } /// Internal Acessors for PublishingProfileSource - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal.PublishingProfileSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileSource = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal.PublishingProfileSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileSource = value; } /// Internal Acessors for ReplicationStatus - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal.ReplicationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatus = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal.ReplicationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatus = value; } /// Internal Acessors for ReplicationStatusAggregatedState - Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal.ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusAggregatedState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusAggregatedState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal.ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusAggregatedState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusAggregatedState = value; } /// Internal Acessors for ReplicationStatusSummary - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdateInternal.ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusSummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusSummary = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdateInternal.ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusSummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusSummary = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type = value; } /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; } /// Required. The mediaLink of the artifact, must be a readable storage page blob. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string PackageFileLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PackageFileLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PackageFileLink = value ?? null; } + public string PackageFileLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PackageFileLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PackageFileLink = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties _property; /// Describes the properties of a gallery image version. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionProperties()); set => this._property = value; } /// The provisioning state, which only appears in the response. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ProvisioningState; } + + /// + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings PublishingProfileAdvancedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileAdvancedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileAdvancedSetting = value ?? null /* model class */; } /// Optional. Whether or not this application reports health. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public bool? PublishingProfileEnableHealthCheck { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileEnableHealthCheck; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileEnableHealthCheck = value ?? default(bool); } + public bool? PublishingProfileEnableHealthCheck { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileEnableHealthCheck; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileEnableHealthCheck = value ?? default(bool); } /// /// The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property /// is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public global::System.DateTime? PublishingProfileEndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileEndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileEndOfLifeDate = value ?? default(global::System.DateTime); } + public global::System.DateTime? PublishingProfileEndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileEndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileEndOfLifeDate = value ?? default(global::System.DateTime); } /// /// If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public bool? PublishingProfileExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileExcludeFromLatest; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileExcludeFromLatest = value ?? default(bool); } + public bool? PublishingProfileExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileExcludeFromLatest; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileExcludeFromLatest = value ?? default(bool); } /// The timestamp for when the gallery image version is published. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public global::System.DateTime? PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfilePublishedDate; } + public global::System.DateTime? PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfilePublishedDate; } /// /// Optional parameter which specifies the mode to be used for replication. This property is not updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode? PublishingProfileReplicationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileReplicationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileReplicationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode? PublishingProfileReplicationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileReplicationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileReplicationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); } /// /// Specifies the storage account type to be used to store the image. This property is not updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileStorageAccountType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileStorageAccountType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileStorageAccountType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileStorageAccountType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); } + + /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileTargetExtendedLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).PublishingProfileTargetExtendedLocation = value ?? null /* arrayOf */; } /// /// Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Remove { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).Remove; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).Remove = value ?? null; } + public string Remove { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).Remove; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).Remove = value ?? null; } /// /// The number of replicas of the Image Version to be created per region. This property would take effect for a region when /// regionalReplicaCount is not specified. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? ReplicaCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicaCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicaCount = value ?? default(int); } + public int? ReplicaCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicaCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicaCount = value ?? default(int); } /// /// This is the aggregated replication status based on all the regional replication status flags. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusAggregatedState; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusAggregatedState; } /// This is a summary of replication status for each region. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusSummary; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusSummary; } + + /// + /// Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, + /// the config file will be named the Gallery Application name appended with "_config". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string SettingConfigFileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).SettingConfigFileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).SettingConfigFileName = value ?? null; } + + /// + /// Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, + /// the package file will be named the same as the Gallery Application name. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string SettingPackageFileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).SettingPackageFileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).SettingPackageFileName = value ?? null; } /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag = value ?? null /* model class */; } /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] TargetRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).TargetRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).TargetRegion = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] TargetRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).TargetRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).TargetRegion = value ?? null /* arrayOf */; } /// Resource type [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; } /// /// Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke @@ -168,7 +197,7 @@ public partial class GalleryApplicationVersionUpdate : /// limited to 4096 characters. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Update { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).Update; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPropertiesInternal)Property).Update = value ?? null; } + public string Update { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).Update; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).Update = value ?? null; } /// Creates an new instance. public GalleryApplicationVersionUpdate() @@ -180,7 +209,7 @@ public GalleryApplicationVersionUpdate() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { @@ -191,7 +220,7 @@ public GalleryApplicationVersionUpdate() /// Specifies information about the gallery Application Version that you want to update. public partial interface IGalleryApplicationVersionUpdate : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinition + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinition { /// /// Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. @@ -227,8 +256,18 @@ public partial interface IGalleryApplicationVersionUpdate : ReadOnly = true, Description = @"The provisioning state, which only appears in the response.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(string) })] - string ProvisioningState { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; } + /// + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only.", + SerializedName = @"advancedSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings PublishingProfileAdvancedSetting { get; set; } /// Optional. Whether or not this application reports health. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, @@ -287,6 +326,16 @@ public partial interface IGalleryApplicationVersionUpdate : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType) })] Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get; set; } /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The target extended locations where the Image Version is going to be replicated to. This property is updatable.", + SerializedName = @"targetExtendedLocations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get; set; } + /// /// Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( @@ -323,8 +372,30 @@ public partial interface IGalleryApplicationVersionUpdate : ReadOnly = true, Description = @"This is a summary of replication status for each region.", SerializedName = @"summary", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] ReplicationStatusSummary { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] ReplicationStatusSummary { get; } + /// + /// Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, + /// the config file will be named the Gallery Application name appended with "_config". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with ""_config"".", + SerializedName = @"configFileName", + PossibleTypes = new [] { typeof(string) })] + string SettingConfigFileName { get; set; } + /// + /// Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, + /// the package file will be named the same as the Gallery Application name. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, the package file will be named the same as the Gallery Application name.", + SerializedName = @"packageFileName", + PossibleTypes = new [] { typeof(string) })] + string SettingPackageFileName { get; set; } /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// @@ -333,8 +404,8 @@ public partial interface IGalleryApplicationVersionUpdate : ReadOnly = false, Description = @"The target regions where the Image Version is going to be replicated to. This property is updatable.", SerializedName = @"targetRegions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] TargetRegion { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] TargetRegion { get; set; } /// /// Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke /// remove command on the previous version and install command on the current version of the gallery application. This is @@ -351,7 +422,7 @@ public partial interface IGalleryApplicationVersionUpdate : } /// Specifies information about the gallery Application Version that you want to update. internal partial interface IGalleryApplicationVersionUpdateInternal : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal { /// /// Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. @@ -364,11 +435,15 @@ internal partial interface IGalleryApplicationVersionUpdateInternal : /// Required. The mediaLink of the artifact, must be a readable storage page blob. string PackageFileLink { get; set; } /// Describes the properties of a gallery image version. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties Property { get; set; } /// The provisioning state, which only appears in the response. - string ProvisioningState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; set; } /// The publishing profile of a gallery image version. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionPublishingProfile PublishingProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfile PublishingProfile { get; set; } + /// + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + /// + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings PublishingProfileAdvancedSetting { get; set; } /// Optional. Whether or not this application reports health. bool? PublishingProfileEnableHealthCheck { get; set; } /// @@ -381,20 +456,29 @@ internal partial interface IGalleryApplicationVersionUpdateInternal : /// bool? PublishingProfileExcludeFromLatest { get; set; } - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage PublishingProfileManageAction { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage PublishingProfileManageAction { get; set; } /// The timestamp for when the gallery image version is published. global::System.DateTime? PublishingProfilePublishedDate { get; set; } /// /// Optional parameter which specifies the mode to be used for replication. This property is not updatable. /// Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode? PublishingProfileReplicationMode { get; set; } + /// + /// Additional settings for the VM app that contains the target package and config file name when it is deployed to target + /// VM or VM scale set. + /// + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings PublishingProfileSetting { get; set; } /// The source image from which the Image Version is going to be created. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource PublishingProfileSource { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource PublishingProfileSource { get; set; } /// /// Specifies the storage account type to be used to store the image. This property is not updatable. /// Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get; set; } /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get; set; } + /// /// Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. /// string Remove { get; set; } @@ -404,17 +488,27 @@ internal partial interface IGalleryApplicationVersionUpdateInternal : /// int? ReplicaCount { get; set; } /// This is the replication status of the gallery image version. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus ReplicationStatus { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus ReplicationStatus { get; set; } /// /// This is the aggregated replication status based on all the regional replication status flags. /// Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? ReplicationStatusAggregatedState { get; set; } /// This is a summary of replication status for each region. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] ReplicationStatusSummary { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] ReplicationStatusSummary { get; set; } + /// + /// Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, + /// the config file will be named the Gallery Application name appended with "_config". + /// + string SettingConfigFileName { get; set; } + /// + /// Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, + /// the package file will be named the same as the Gallery Application name. + /// + string SettingPackageFileName { get; set; } /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] TargetRegion { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] TargetRegion { get; set; } /// /// Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke /// remove command on the previous version and install command on the current version of the gallery application. This is diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionUpdate.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionUpdate.json.cs similarity index 90% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionUpdate.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionUpdate.json.cs index d826f365147f..5e21693ea527 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryApplicationVersionUpdate.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersionUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -22,7 +22,7 @@ public partial class GalleryApplicationVersionUpdate partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -32,7 +32,8 @@ public partial class GalleryApplicationVersionUpdate /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -44,7 +45,8 @@ public partial class GalleryApplicationVersionUpdate /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -54,13 +56,13 @@ public partial class GalleryApplicationVersionUpdate partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryApplicationVersionUpdate(json) : null; } @@ -77,8 +79,8 @@ internal GalleryApplicationVersionUpdate(Microsoft.Azure.PowerShell.Cmdlets.Comp { return; } - __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinition(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionProperties.FromJson(__jsonProperties) : Property;} + __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinition(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactPublishingProfileBase.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactPublishingProfileBase.PowerShell.cs new file mode 100644 index 000000000000..a7ab5aa37e17 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactPublishingProfileBase.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Describes the basic gallery artifact publishing profile. + [System.ComponentModel.TypeConverter(typeof(GalleryArtifactPublishingProfileBaseTypeConverter))] + public partial class GalleryArtifactPublishingProfileBase + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryArtifactPublishingProfileBase(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryArtifactPublishingProfileBase(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryArtifactPublishingProfileBase(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TargetRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegionTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ExcludeFromLatest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("StorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("ReplicationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("ReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); + } + if (content.Contains("TargetExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[]) content.GetValueForProperty("TargetExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetExtendedLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocationTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryArtifactPublishingProfileBase(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TargetRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegionTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ExcludeFromLatest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("StorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("ReplicationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("ReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); + } + if (content.Contains("TargetExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[]) content.GetValueForProperty("TargetExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetExtendedLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocationTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Describes the basic gallery artifact publishing profile. + [System.ComponentModel.TypeConverter(typeof(GalleryArtifactPublishingProfileBaseTypeConverter))] + public partial interface IGalleryArtifactPublishingProfileBase + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactPublishingProfileBase.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactPublishingProfileBase.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactPublishingProfileBase.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactPublishingProfileBase.TypeConverter.cs index 64e75ce3f599..b3e930b3e355 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactPublishingProfileBase.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactPublishingProfileBase.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -15,20 +15,20 @@ public partial class GalleryArtifactPublishingProfileBaseTypeConverter : global: { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -77,19 +77,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -101,21 +102,21 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactPublishingProfileBase.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactPublishingProfileBase.cs similarity index 83% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactPublishingProfileBase.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactPublishingProfileBase.cs index f2d7bdb834c5..ae0d3fb23751 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactPublishingProfileBase.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactPublishingProfileBase.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// Describes the basic gallery artifact publishing profile. public partial class GalleryArtifactPublishingProfileBase : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal { /// Backing field for property. @@ -33,7 +33,7 @@ public partial class GalleryArtifactPublishingProfileBase : public bool? ExcludeFromLatest { get => this._excludeFromLatest; set => this._excludeFromLatest = value; } /// Internal Acessors for PublishedDate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal.PublishedDate { get => this._publishedDate; set { {_publishedDate = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal.PublishedDate { get => this._publishedDate; set { {_publishedDate = value;} } } /// Backing field for property. private global::System.DateTime? _publishedDate; @@ -70,14 +70,23 @@ public partial class GalleryArtifactPublishingProfileBase : [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? StorageAccountType { get => this._storageAccountType; set => this._storageAccountType = value; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] _targetExtendedLocation; + + /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] TargetExtendedLocation { get => this._targetExtendedLocation; set => this._targetExtendedLocation = value; } + /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] _targetRegion; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] _targetRegion; /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] TargetRegion { get => this._targetRegion; set => this._targetRegion = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] TargetRegion { get => this._targetRegion; set => this._targetRegion = value; } /// Creates an new instance. public GalleryArtifactPublishingProfileBase() @@ -150,6 +159,16 @@ public partial interface IGalleryArtifactPublishingProfileBase : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType) })] Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? StorageAccountType { get; set; } /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The target extended locations where the Image Version is going to be replicated to. This property is updatable.", + SerializedName = @"targetExtendedLocations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] TargetExtendedLocation { get; set; } + /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( @@ -157,8 +176,8 @@ public partial interface IGalleryArtifactPublishingProfileBase : ReadOnly = false, Description = @"The target regions where the Image Version is going to be replicated to. This property is updatable.", SerializedName = @"targetRegions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] TargetRegion { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] TargetRegion { get; set; } } /// Describes the basic gallery artifact publishing profile. @@ -190,9 +209,13 @@ internal partial interface IGalleryArtifactPublishingProfileBaseInternal /// Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? StorageAccountType { get; set; } /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] TargetExtendedLocation { get; set; } + /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] TargetRegion { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] TargetRegion { get; set; } } } \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactPublishingProfileBase.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactPublishingProfileBase.json.cs similarity index 84% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactPublishingProfileBase.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactPublishingProfileBase.json.cs index c6d97d21f781..6bbe4310b774 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactPublishingProfileBase.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactPublishingProfileBase.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryArtifactPublishingProfileBase partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryArtifactPublishingProfileBase /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryArtifactPublishingProfileBase /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryArtifactPublishingProfileBase partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryArtifactPublishingProfileBase(json) : null; } @@ -75,13 +77,14 @@ internal GalleryArtifactPublishingProfileBase(Microsoft.Azure.PowerShell.Cmdlets { return; } - {_targetRegion = If( json?.PropertyT("targetRegions"), out var __jsonTargetRegions) ? If( __jsonTargetRegions as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.TargetRegion.FromJson(__u) )) ))() : null : TargetRegion;} + {_targetRegion = If( json?.PropertyT("targetRegions"), out var __jsonTargetRegions) ? If( __jsonTargetRegions as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegion.FromJson(__u) )) ))() : null : TargetRegion;} {_replicaCount = If( json?.PropertyT("replicaCount"), out var __jsonReplicaCount) ? (int?)__jsonReplicaCount : ReplicaCount;} {_excludeFromLatest = If( json?.PropertyT("excludeFromLatest"), out var __jsonExcludeFromLatest) ? (bool?)__jsonExcludeFromLatest : ExcludeFromLatest;} {_publishedDate = If( json?.PropertyT("publishedDate"), out var __jsonPublishedDate) ? global::System.DateTime.TryParse((string)__jsonPublishedDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonPublishedDateValue) ? __jsonPublishedDateValue : PublishedDate : PublishedDate;} {_endOfLifeDate = If( json?.PropertyT("endOfLifeDate"), out var __jsonEndOfLifeDate) ? global::System.DateTime.TryParse((string)__jsonEndOfLifeDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndOfLifeDateValue) ? __jsonEndOfLifeDateValue : EndOfLifeDate : EndOfLifeDate;} {_storageAccountType = If( json?.PropertyT("storageAccountType"), out var __jsonStorageAccountType) ? (string)__jsonStorageAccountType : (string)StorageAccountType;} {_replicationMode = If( json?.PropertyT("replicationMode"), out var __jsonReplicationMode) ? (string)__jsonReplicationMode : (string)ReplicationMode;} + {_targetExtendedLocation = If( json?.PropertyT("targetExtendedLocations"), out var __jsonTargetExtendedLocations) ? If( __jsonTargetExtendedLocations as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocation.FromJson(__p) )) ))() : null : TargetExtendedLocation;} AfterFromJson(json); } @@ -123,6 +126,15 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode ToJson(M AddIf( null != this._endOfLifeDate ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._endOfLifeDate?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endOfLifeDate" ,container.Add ); AddIf( null != (((object)this._storageAccountType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._storageAccountType.ToString()) : null, "storageAccountType" ,container.Add ); AddIf( null != (((object)this._replicationMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._replicationMode.ToString()) : null, "replicationMode" ,container.Add ); + if (null != this._targetExtendedLocation) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.XNodeArray(); + foreach( var __s in this._targetExtendedLocation ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("targetExtendedLocations",__r); + } AfterToJson(ref container); return container; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactSource.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactSource.PowerShell.cs similarity index 70% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactSource.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactSource.PowerShell.cs index a0e89cf226d7..95f7ec997aea 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactSource.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactSource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class GalleryArtifactSource /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class GalleryArtifactSource /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class GalleryArtifactSource partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactSource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GalleryArtifactSource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GalleryArtifactSource(content); } @@ -82,11 +84,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGal /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -99,13 +101,19 @@ internal GalleryArtifactSource(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactSourceInternal)this).ManagedImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifact) content.GetValueForProperty("ManagedImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactSourceInternal)this).ManagedImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ManagedArtifactTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactSourceInternal)this).ManagedImageId = (string) content.GetValueForProperty("ManagedImageId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactSourceInternal)this).ManagedImageId, global::System.Convert.ToString); + if (content.Contains("ManagedImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactSourceInternal)this).ManagedImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifact) content.GetValueForProperty("ManagedImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactSourceInternal)this).ManagedImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ManagedArtifactTypeConverter.ConvertFrom); + } + if (content.Contains("ManagedImageId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactSourceInternal)this).ManagedImageId = (string) content.GetValueForProperty("ManagedImageId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactSourceInternal)this).ManagedImageId, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -118,8 +126,14 @@ internal GalleryArtifactSource(global::System.Management.Automation.PSObject con return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactSourceInternal)this).ManagedImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifact) content.GetValueForProperty("ManagedImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactSourceInternal)this).ManagedImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ManagedArtifactTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactSourceInternal)this).ManagedImageId = (string) content.GetValueForProperty("ManagedImageId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactSourceInternal)this).ManagedImageId, global::System.Convert.ToString); + if (content.Contains("ManagedImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactSourceInternal)this).ManagedImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifact) content.GetValueForProperty("ManagedImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactSourceInternal)this).ManagedImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ManagedArtifactTypeConverter.ConvertFrom); + } + if (content.Contains("ManagedImageId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactSourceInternal)this).ManagedImageId = (string) content.GetValueForProperty("ManagedImageId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactSourceInternal)this).ManagedImageId, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactSource.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactSource.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactSource.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactSource.TypeConverter.cs index fcd9358a45fe..f1b98dc2dffe 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactSource.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryArtifactSourceTypeConverter : global::System.Managem { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactSource.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactSource.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactSource.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactSource.cs index 940b4a7ceb7b..c586501045bf 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactSource.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactSource.cs @@ -3,29 +3,29 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// The source image from which the Image Version is going to be created. public partial class GalleryArtifactSource : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactSource, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactSourceInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactSource, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactSourceInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifact _managedImage; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifact _managedImage; /// The managed artifact. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifact ManagedImage { get => (this._managedImage = this._managedImage ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ManagedArtifact()); set => this._managedImage = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifact ManagedImage { get => (this._managedImage = this._managedImage ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ManagedArtifact()); set => this._managedImage = value; } /// The managed artifact id. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string ManagedImageId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifactInternal)ManagedImage).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifactInternal)ManagedImage).Id = value ; } + public string ManagedImageId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifactInternal)ManagedImage).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifactInternal)ManagedImage).Id = value ; } /// Internal Acessors for ManagedImage - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifact Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactSourceInternal.ManagedImage { get => (this._managedImage = this._managedImage ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ManagedArtifact()); set { {_managedImage = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifact Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactSourceInternal.ManagedImage { get => (this._managedImage = this._managedImage ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ManagedArtifact()); set { {_managedImage = value;} } } /// Creates an new instance. public GalleryArtifactSource() @@ -52,7 +52,7 @@ internal partial interface IGalleryArtifactSourceInternal { /// The managed artifact. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifact ManagedImage { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifact ManagedImage { get; set; } /// The managed artifact id. string ManagedImageId { get; set; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactSource.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactSource.json.cs similarity index 90% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactSource.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactSource.json.cs index 4244c8e11544..4625f7d64717 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactSource.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryArtifactSource partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryArtifactSource /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryArtifactSource /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryArtifactSource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryArtifactSource(json) : null; } @@ -75,7 +77,7 @@ internal GalleryArtifactSource(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtim { return; } - {_managedImage = If( json?.PropertyT("managedImage"), out var __jsonManagedImage) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ManagedArtifact.FromJson(__jsonManagedImage) : ManagedImage;} + {_managedImage = If( json?.PropertyT("managedImage"), out var __jsonManagedImage) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ManagedArtifact.FromJson(__jsonManagedImage) : ManagedImage;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactVersionSource.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactVersionSource.PowerShell.cs similarity index 74% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactVersionSource.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactVersionSource.PowerShell.cs index eebdf4f24c71..091d55e42ca7 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactVersionSource.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactVersionSource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class GalleryArtifactVersionSource /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class GalleryArtifactVersionSource /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,29 +55,29 @@ public partial class GalleryArtifactVersionSource partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GalleryArtifactVersionSource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GalleryArtifactVersionSource(content); } @@ -84,11 +86,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGal /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -101,13 +103,19 @@ internal GalleryArtifactVersionSource(global::System.Collections.IDictionary con return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSourceInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSourceInternal)this).Uri, global::System.Convert.ToString); + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSourceInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSourceInternal)this).Uri, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -120,8 +128,14 @@ internal GalleryArtifactVersionSource(global::System.Management.Automation.PSObj return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSourceInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSourceInternal)this).Uri, global::System.Convert.ToString); + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSourceInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSourceInternal)this).Uri, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactVersionSource.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactVersionSource.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactVersionSource.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactVersionSource.TypeConverter.cs index 6e27a2f9410f..3947932a6dc6 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactVersionSource.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactVersionSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryArtifactVersionSourceTypeConverter : global::System. { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactVersionSource.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactVersionSource.cs similarity index 97% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactVersionSource.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactVersionSource.cs index cb214c5544bf..747a0fbbf251 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactVersionSource.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactVersionSource.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// The gallery artifact version source. public partial class GalleryArtifactVersionSource : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSourceInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSourceInternal { /// Backing field for property. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactVersionSource.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactVersionSource.json.cs similarity index 92% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactVersionSource.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactVersionSource.json.cs index 364e81e90850..b286ea58e69e 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryArtifactVersionSource.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryArtifactVersionSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryArtifactVersionSource partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryArtifactVersionSource /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryArtifactVersionSource /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryArtifactVersionSource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryArtifactVersionSource(json) : null; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDataDiskImage.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDataDiskImage.PowerShell.cs similarity index 52% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDataDiskImage.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDataDiskImage.PowerShell.cs index 4c298b21255e..93dc32cb074d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDataDiskImage.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDataDiskImage.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class GalleryDataDiskImage /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class GalleryDataDiskImage /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class GalleryDataDiskImage partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GalleryDataDiskImage(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GalleryDataDiskImage(content); } @@ -82,11 +84,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGal /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -99,17 +101,35 @@ internal GalleryDataDiskImage(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImageInternal)this).Lun = (int) content.GetValueForProperty("Lun",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImageInternal)this).Lun, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SizeInGb = (int?) content.GetValueForProperty("SizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).HostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("HostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).HostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); + if (content.Contains("Lun")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImageInternal)this).Lun = (int) content.GetValueForProperty("Lun",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImageInternal)this).Lun, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceId, global::System.Convert.ToString); + } + if (content.Contains("SourceUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceUri, global::System.Convert.ToString); + } + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("SizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SizeInGb = (int?) content.GetValueForProperty("SizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HostCaching")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).HostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("HostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).HostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -122,12 +142,30 @@ internal GalleryDataDiskImage(global::System.Management.Automation.PSObject cont return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImageInternal)this).Lun = (int) content.GetValueForProperty("Lun",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImageInternal)this).Lun, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SizeInGb = (int?) content.GetValueForProperty("SizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).HostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("HostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).HostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); + if (content.Contains("Lun")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImageInternal)this).Lun = (int) content.GetValueForProperty("Lun",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImageInternal)this).Lun, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceId, global::System.Convert.ToString); + } + if (content.Contains("SourceUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceUri, global::System.Convert.ToString); + } + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("SizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SizeInGb = (int?) content.GetValueForProperty("SizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HostCaching")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).HostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("HostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).HostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDataDiskImage.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDataDiskImage.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDataDiskImage.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDataDiskImage.TypeConverter.cs index 3f03c220afcd..6fdbad6e89b7 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDataDiskImage.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDataDiskImage.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryDataDiskImageTypeConverter : global::System.Manageme { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDataDiskImage.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDataDiskImage.cs similarity index 83% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDataDiskImage.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDataDiskImage.cs index f9194c4f9520..a1dfa1426d1d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDataDiskImage.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDataDiskImage.cs @@ -3,27 +3,27 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// This is the data disk image. public partial class GalleryDataDiskImage : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImageInternal, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImageInternal, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage __galleryDiskImage = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDiskImage(); + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage __galleryDiskImage = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDiskImage(); /// /// The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite' /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching? HostCaching { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).HostCaching; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).HostCaching = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching? HostCaching { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).HostCaching; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).HostCaching = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching)""); } /// Backing field for property. private int _lun; @@ -36,27 +36,27 @@ public partial class GalleryDataDiskImage : public int Lun { get => this._lun; set => this._lun = value; } /// Internal Acessors for SizeInGb - int? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal.SizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).SizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).SizeInGb = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal.SizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).SizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).SizeInGb = value; } /// This property indicates the size of the VHD to be created. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public int? SizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).SizeInGb; } + public int? SizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).SizeInGb; } /// The gallery artifact version source. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource Source { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).Source; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).Source = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource Source { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).Source; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).Source = value ?? null /* model class */; } /// /// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string SourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).SourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).SourceId = value ?? null; } + public string SourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).SourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).SourceId = value ?? null; } /// /// The uri of the gallery artifact version source. Currently used to specify vhd/blob source. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string SourceUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).SourceUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).SourceUri = value ?? null; } + public string SourceUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).SourceUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).SourceUri = value ?? null; } /// Creates an new instance. public GalleryDataDiskImage() @@ -68,7 +68,7 @@ public GalleryDataDiskImage() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { @@ -79,7 +79,7 @@ public GalleryDataDiskImage() /// This is the data disk image. public partial interface IGalleryDataDiskImage : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage { /// /// This property specifies the logical unit number of the data disk. This value is used to identify data disks within the @@ -96,7 +96,7 @@ public partial interface IGalleryDataDiskImage : } /// This is the data disk image. internal partial interface IGalleryDataDiskImageInternal : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal { /// /// This property specifies the logical unit number of the data disk. This value is used to identify data disks within the diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDataDiskImage.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDataDiskImage.json.cs similarity index 91% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDataDiskImage.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDataDiskImage.json.cs index 8ec6829743d5..65f95d103301 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDataDiskImage.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDataDiskImage.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryDataDiskImage partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryDataDiskImage /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryDataDiskImage /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryDataDiskImage partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryDataDiskImage(json) : null; } @@ -75,7 +77,7 @@ internal GalleryDataDiskImage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime { return; } - __galleryDiskImage = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDiskImage(json); + __galleryDiskImage = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDiskImage(json); {_lun = If( json?.PropertyT("lun"), out var __jsonLun) ? (int)__jsonLun : Lun;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDiskImage.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDiskImage.PowerShell.cs similarity index 55% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDiskImage.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDiskImage.PowerShell.cs index 3555e2f56c28..9d4a42b02af9 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDiskImage.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDiskImage.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class GalleryDiskImage /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class GalleryDiskImage /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class GalleryDiskImage partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GalleryDiskImage(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GalleryDiskImage(content); } @@ -82,11 +84,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGal /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -99,16 +101,31 @@ internal GalleryDiskImage(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SizeInGb = (int?) content.GetValueForProperty("SizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).HostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("HostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).HostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceUri, global::System.Convert.ToString); + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("SizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SizeInGb = (int?) content.GetValueForProperty("SizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HostCaching")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).HostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("HostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).HostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); + } + if (content.Contains("SourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceId, global::System.Convert.ToString); + } + if (content.Contains("SourceUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceUri, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -121,11 +138,26 @@ internal GalleryDiskImage(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SizeInGb = (int?) content.GetValueForProperty("SizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).HostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("HostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).HostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceUri, global::System.Convert.ToString); + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("SizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SizeInGb = (int?) content.GetValueForProperty("SizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HostCaching")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).HostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("HostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).HostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); + } + if (content.Contains("SourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceId, global::System.Convert.ToString); + } + if (content.Contains("SourceUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceUri, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDiskImage.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDiskImage.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDiskImage.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDiskImage.TypeConverter.cs index b2e654de58b0..85e8d8270593 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDiskImage.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDiskImage.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryDiskImageTypeConverter : global::System.Management.A { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDiskImage.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDiskImage.cs similarity index 89% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDiskImage.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDiskImage.cs index 0f11063222b9..e7bf9ac132d8 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDiskImage.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDiskImage.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// This is the disk image base class. public partial class GalleryDiskImage : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal { /// Backing field for property. @@ -23,10 +23,10 @@ public partial class GalleryDiskImage : public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching? HostCaching { get => this._hostCaching; set => this._hostCaching = value; } /// Internal Acessors for SizeInGb - int? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal.SizeInGb { get => this._sizeInGb; set { {_sizeInGb = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal.SizeInGb { get => this._sizeInGb; set { {_sizeInGb = value;} } } /// Internal Acessors for Source - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal.Source { get => (this._source = this._source ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSource()); set { {_source = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal.Source { get => (this._source = this._source ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSource()); set { {_source = value;} } } /// Backing field for property. private int? _sizeInGb; @@ -36,23 +36,23 @@ public partial class GalleryDiskImage : public int? SizeInGb { get => this._sizeInGb; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource _source; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource _source; /// The gallery artifact version source. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource Source { get => (this._source = this._source ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSource()); set => this._source = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource Source { get => (this._source = this._source ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSource()); set => this._source = value; } /// /// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string SourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSourceInternal)Source).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSourceInternal)Source).Id = value ?? null; } + public string SourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSourceInternal)Source).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSourceInternal)Source).Id = value ?? null; } /// /// The uri of the gallery artifact version source. Currently used to specify vhd/blob source. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string SourceUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSourceInternal)Source).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSourceInternal)Source).Uri = value ?? null; } + public string SourceUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSourceInternal)Source).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSourceInternal)Source).Uri = value ?? null; } /// Creates an new instance. public GalleryDiskImage() @@ -115,7 +115,7 @@ internal partial interface IGalleryDiskImageInternal /// This property indicates the size of the VHD to be created. int? SizeInGb { get; set; } /// The gallery artifact version source. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource Source { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource Source { get; set; } /// /// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDiskImage.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDiskImage.json.cs similarity index 92% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDiskImage.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDiskImage.json.cs index e600cdc4209f..96197e38b9e1 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryDiskImage.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryDiskImage.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryDiskImage partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryDiskImage /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryDiskImage /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryDiskImage partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryDiskImage(json) : null; } @@ -75,7 +77,7 @@ internal GalleryDiskImage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Jso { return; } - {_source = If( json?.PropertyT("source"), out var __jsonSource) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSource.FromJson(__jsonSource) : Source;} + {_source = If( json?.PropertyT("source"), out var __jsonSource) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSource.FromJson(__jsonSource) : Source;} {_sizeInGb = If( json?.PropertyT("sizeInGB"), out var __jsonSizeInGb) ? (int?)__jsonSizeInGb : SizeInGb;} {_hostCaching = If( json?.PropertyT("hostCaching"), out var __jsonHostCaching) ? (string)__jsonHostCaching : (string)HostCaching;} AfterFromJson(json); diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryExtendedLocation.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryExtendedLocation.PowerShell.cs new file mode 100644 index 000000000000..de10ede2d5bf --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryExtendedLocation.PowerShell.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// The name of the extended location. + [System.ComponentModel.TypeConverter(typeof(GalleryExtendedLocationTypeConverter))] + public partial class GalleryExtendedLocation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryExtendedLocation(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryExtendedLocation(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryExtendedLocation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocationInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocationInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryExtendedLocation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocationInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocationInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The name of the extended location. + [System.ComponentModel.TypeConverter(typeof(GalleryExtendedLocationTypeConverter))] + public partial interface IGalleryExtendedLocation + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryExtendedLocation.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryExtendedLocation.TypeConverter.cs new file mode 100644 index 000000000000..acc7c9ecfe1e --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryExtendedLocation.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class GalleryExtendedLocationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return GalleryExtendedLocation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return GalleryExtendedLocation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return GalleryExtendedLocation.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryExtendedLocation.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryExtendedLocation.cs new file mode 100644 index 000000000000..bf79100bca90 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryExtendedLocation.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// The name of the extended location. + public partial class GalleryExtendedLocation : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocation, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocationInternal + { + + /// Backing field for property. + private string _name; + + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType? _type; + + /// It is type of the extended location. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType? Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public GalleryExtendedLocation() + { + + } + } + /// The name of the extended location. + public partial interface IGalleryExtendedLocation : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// It is type of the extended location. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"It is type of the extended location.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType? Type { get; set; } + + } + /// The name of the extended location. + internal partial interface IGalleryExtendedLocationInternal + + { + string Name { get; set; } + /// It is type of the extended location. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType? Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryExtendedLocation.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryExtendedLocation.json.cs new file mode 100644 index 000000000000..3e5921cd4f0e --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryExtendedLocation.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// The name of the extended location. + public partial class GalleryExtendedLocation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocation FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryExtendedLocation(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal GalleryExtendedLocation(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryIdentifier.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryIdentifier.PowerShell.cs similarity index 80% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryIdentifier.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryIdentifier.PowerShell.cs index ed8dedf62b5a..9b96e8668e54 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryIdentifier.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryIdentifier.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class GalleryIdentifier /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class GalleryIdentifier /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class GalleryIdentifier partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GalleryIdentifier(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GalleryIdentifier(content); } @@ -82,11 +84,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGal /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -99,12 +101,15 @@ internal GalleryIdentifier(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifierInternal)this).UniqueName = (string) content.GetValueForProperty("UniqueName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifierInternal)this).UniqueName, global::System.Convert.ToString); + if (content.Contains("UniqueName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifierInternal)this).UniqueName = (string) content.GetValueForProperty("UniqueName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifierInternal)this).UniqueName, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -117,7 +122,10 @@ internal GalleryIdentifier(global::System.Management.Automation.PSObject content return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifierInternal)this).UniqueName = (string) content.GetValueForProperty("UniqueName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifierInternal)this).UniqueName, global::System.Convert.ToString); + if (content.Contains("UniqueName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifierInternal)this).UniqueName = (string) content.GetValueForProperty("UniqueName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifierInternal)this).UniqueName, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryIdentifier.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryIdentifier.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryIdentifier.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryIdentifier.TypeConverter.cs index 0aa35a4dd297..984ec95ef1fc 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryIdentifier.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryIdentifier.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryIdentifierTypeConverter : global::System.Management. { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryIdentifier.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryIdentifier.cs similarity index 94% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryIdentifier.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryIdentifier.cs index f1bd3c4874dc..359e12817da6 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryIdentifier.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryIdentifier.cs @@ -3,18 +3,18 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// Describes the gallery unique name. public partial class GalleryIdentifier : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifierInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifierInternal { /// Internal Acessors for UniqueName - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifierInternal.UniqueName { get => this._uniqueName; set { {_uniqueName = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifierInternal.UniqueName { get => this._uniqueName; set { {_uniqueName = value;} } } /// Backing field for property. private string _uniqueName; diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryIdentifier.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryIdentifier.json.cs similarity index 91% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryIdentifier.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryIdentifier.json.cs index 96382a6ef482..6edb12ca7bde 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryIdentifier.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryIdentifier.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryIdentifier partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryIdentifier /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryIdentifier /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryIdentifier partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryIdentifier(json) : null; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.PowerShell.cs new file mode 100644 index 000000000000..de0f668754bd --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.PowerShell.cs @@ -0,0 +1,410 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// Specifies information about the gallery image definition that you want to create or update. + /// + [System.ComponentModel.TypeConverter(typeof(GalleryImageTypeConverter))] + public partial class GalleryImage + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryImage(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryImage(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryImage(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImagePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Disallowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Disallowed = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed) content.GetValueForProperty("Disallowed",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Disallowed, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DisallowedTypeConverter.ConvertFrom); + } + if (content.Contains("Architecture")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Architecture = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture?) content.GetValueForProperty("Architecture",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Architecture, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture.CreateFrom); + } + if (content.Contains("Identifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageIdentifierTypeConverter.ConvertFrom); + } + if (content.Contains("Recommended")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Recommended = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration) content.GetValueForProperty("Recommended",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Recommended, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RecommendedMachineConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("PurchasePlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PurchasePlan = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan) content.GetValueForProperty("PurchasePlan",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PurchasePlan, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ImagePurchasePlanTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Eula")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Eula, global::System.Convert.ToString); + } + if (content.Contains("PrivacyStatementUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PrivacyStatementUri, global::System.Convert.ToString); + } + if (content.Contains("ReleaseNoteUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).ReleaseNoteUri, global::System.Convert.ToString); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); + } + if (content.Contains("OSState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).OSState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes) content.GetValueForProperty("OSState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).OSState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes.CreateFrom); + } + if (content.Contains("HyperVGeneration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).HyperVGeneration = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration?) content.GetValueForProperty("HyperVGeneration",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).HyperVGeneration, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration.CreateFrom); + } + if (content.Contains("EndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("Feature")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Feature = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature[]) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Feature, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageFeatureTypeConverter.ConvertFrom)); + } + if (content.Contains("DisallowedDiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).DisallowedDiskType = (string[]) content.GetValueForProperty("DisallowedDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).DisallowedDiskType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("IdentifierPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).IdentifierPublisher = (string) content.GetValueForProperty("IdentifierPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).IdentifierPublisher, global::System.Convert.ToString); + } + if (content.Contains("IdentifierOffer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).IdentifierOffer = (string) content.GetValueForProperty("IdentifierOffer",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).IdentifierOffer, global::System.Convert.ToString); + } + if (content.Contains("IdentifierSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).IdentifierSku = (string) content.GetValueForProperty("IdentifierSku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).IdentifierSku, global::System.Convert.ToString); + } + if (content.Contains("RecommendedVCpUs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).RecommendedVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange) content.GetValueForProperty("RecommendedVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).RecommendedVCpUs, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("RecommendedMemory")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).RecommendedMemory = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange) content.GetValueForProperty("RecommendedMemory",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).RecommendedMemory, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("PurchasePlanName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PurchasePlanName = (string) content.GetValueForProperty("PurchasePlanName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PurchasePlanName, global::System.Convert.ToString); + } + if (content.Contains("PurchasePlanPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PurchasePlanPublisher = (string) content.GetValueForProperty("PurchasePlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PurchasePlanPublisher, global::System.Convert.ToString); + } + if (content.Contains("PurchasePlanProduct")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PurchasePlanProduct = (string) content.GetValueForProperty("PurchasePlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PurchasePlanProduct, global::System.Convert.ToString); + } + if (content.Contains("VCpUsMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VCpUsMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryImage(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImagePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Disallowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Disallowed = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed) content.GetValueForProperty("Disallowed",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Disallowed, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DisallowedTypeConverter.ConvertFrom); + } + if (content.Contains("Architecture")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Architecture = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture?) content.GetValueForProperty("Architecture",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Architecture, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture.CreateFrom); + } + if (content.Contains("Identifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageIdentifierTypeConverter.ConvertFrom); + } + if (content.Contains("Recommended")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Recommended = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration) content.GetValueForProperty("Recommended",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Recommended, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RecommendedMachineConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("PurchasePlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PurchasePlan = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan) content.GetValueForProperty("PurchasePlan",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PurchasePlan, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ImagePurchasePlanTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Eula")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Eula, global::System.Convert.ToString); + } + if (content.Contains("PrivacyStatementUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PrivacyStatementUri, global::System.Convert.ToString); + } + if (content.Contains("ReleaseNoteUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).ReleaseNoteUri, global::System.Convert.ToString); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); + } + if (content.Contains("OSState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).OSState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes) content.GetValueForProperty("OSState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).OSState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes.CreateFrom); + } + if (content.Contains("HyperVGeneration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).HyperVGeneration = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration?) content.GetValueForProperty("HyperVGeneration",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).HyperVGeneration, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration.CreateFrom); + } + if (content.Contains("EndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("Feature")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Feature = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature[]) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).Feature, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageFeatureTypeConverter.ConvertFrom)); + } + if (content.Contains("DisallowedDiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).DisallowedDiskType = (string[]) content.GetValueForProperty("DisallowedDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).DisallowedDiskType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("IdentifierPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).IdentifierPublisher = (string) content.GetValueForProperty("IdentifierPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).IdentifierPublisher, global::System.Convert.ToString); + } + if (content.Contains("IdentifierOffer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).IdentifierOffer = (string) content.GetValueForProperty("IdentifierOffer",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).IdentifierOffer, global::System.Convert.ToString); + } + if (content.Contains("IdentifierSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).IdentifierSku = (string) content.GetValueForProperty("IdentifierSku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).IdentifierSku, global::System.Convert.ToString); + } + if (content.Contains("RecommendedVCpUs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).RecommendedVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange) content.GetValueForProperty("RecommendedVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).RecommendedVCpUs, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("RecommendedMemory")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).RecommendedMemory = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange) content.GetValueForProperty("RecommendedMemory",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).RecommendedMemory, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("PurchasePlanName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PurchasePlanName = (string) content.GetValueForProperty("PurchasePlanName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PurchasePlanName, global::System.Convert.ToString); + } + if (content.Contains("PurchasePlanPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PurchasePlanPublisher = (string) content.GetValueForProperty("PurchasePlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PurchasePlanPublisher, global::System.Convert.ToString); + } + if (content.Contains("PurchasePlanProduct")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PurchasePlanProduct = (string) content.GetValueForProperty("PurchasePlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).PurchasePlanProduct, global::System.Convert.ToString); + } + if (content.Contains("VCpUsMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VCpUsMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Specifies information about the gallery image definition that you want to create or update. + [System.ComponentModel.TypeConverter(typeof(GalleryImageTypeConverter))] + public partial interface IGalleryImage + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImage.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImage.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.TypeConverter.cs index c0c7ae86cfdd..6a47f0c8a1d8 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImage.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryImageTypeConverter : global::System.Management.Autom { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImage.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.cs similarity index 78% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImage.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.cs index 1e603bc55de6..94e3ce41d6b8 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImage.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 /// Specifies information about the gallery image definition that you want to create or update. /// public partial class GalleryImage : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// @@ -21,34 +21,38 @@ public partial class GalleryImage : /// private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Resource(); + /// The architecture of the image. Applicable to OS disks only. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture? Architecture { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Architecture; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Architecture = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture)""); } + /// /// The description of this gallery image definition resource. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Description = value ?? null; } + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Description = value ?? null; } /// A list of disk types. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string[] DisallowedDiskType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).DisallowedDiskType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).DisallowedDiskType = value ?? null /* arrayOf */; } + public string[] DisallowedDiskType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).DisallowedDiskType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).DisallowedDiskType = value ?? null /* arrayOf */; } /// /// The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property /// is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public global::System.DateTime? EndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).EndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).EndOfLifeDate = value ?? default(global::System.DateTime); } + public global::System.DateTime? EndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).EndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).EndOfLifeDate = value ?? default(global::System.DateTime); } /// The Eula agreement for the gallery image definition. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Eula { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Eula; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Eula = value ?? null; } + public string Eula { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Eula; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Eula = value ?? null; } /// A list of gallery image features. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature[] Feature { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Feature; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Feature = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature[] Feature { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Feature; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Feature = value ?? null /* arrayOf */; } /// The hypervisor generation of the Virtual Machine. Applicable to OS disks only. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration? HyperVGeneration { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).HyperVGeneration; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).HyperVGeneration = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration? HyperVGeneration { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).HyperVGeneration; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).HyperVGeneration = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration)""); } /// Resource Id [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] @@ -56,15 +60,15 @@ public partial class GalleryImage : /// The name of the gallery image definition offer. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string IdentifierOffer { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).IdentifierOffer; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).IdentifierOffer = value ?? null; } + public string IdentifierOffer { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).IdentifierOffer; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).IdentifierOffer = value ?? null; } /// The name of the gallery image definition publisher. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string IdentifierPublisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).IdentifierPublisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).IdentifierPublisher = value ?? null; } + public string IdentifierPublisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).IdentifierPublisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).IdentifierPublisher = value ?? null; } /// The name of the gallery image definition SKU. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string IdentifierSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).IdentifierSku; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).IdentifierSku = value ?? null; } + public string IdentifierSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).IdentifierSku; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).IdentifierSku = value ?? null; } /// Resource location [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] @@ -72,44 +76,44 @@ public partial class GalleryImage : /// The maximum number of the resource. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).MemoryMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).MemoryMax = value ?? default(int); } + public int? MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).MemoryMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).MemoryMax = value ?? default(int); } /// The minimum number of the resource. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).MemoryMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).MemoryMin = value ?? default(int); } + public int? MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).MemoryMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).MemoryMin = value ?? default(int); } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Type = value; } /// Internal Acessors for Disallowed - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal.Disallowed { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Disallowed; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Disallowed = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal.Disallowed { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Disallowed; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Disallowed = value; } /// Internal Acessors for Identifier - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal.Identifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Identifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Identifier = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal.Identifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Identifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Identifier = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for PurchasePlan - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal.PurchasePlan { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PurchasePlan; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PurchasePlan = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal.PurchasePlan { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PurchasePlan; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PurchasePlan = value; } /// Internal Acessors for Recommended - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal.Recommended { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Recommended; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Recommended = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal.Recommended { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Recommended; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Recommended = value; } /// Internal Acessors for RecommendedMemory - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal.RecommendedMemory { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).RecommendedMemory; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).RecommendedMemory = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal.RecommendedMemory { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).RecommendedMemory; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).RecommendedMemory = value; } /// Internal Acessors for RecommendedVCpUs - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageInternal.RecommendedVCpUs { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).RecommendedVCpUs; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).RecommendedVCpUs = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Type = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal.RecommendedVCpUs { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).RecommendedVCpUs; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).RecommendedVCpUs = value; } /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] @@ -119,45 +123,45 @@ public partial class GalleryImage : /// This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes? OSState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).OSState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).OSState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes? OSState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).OSState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).OSState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes)""); } /// /// This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed /// image.

Possible values are:

**Windows**

**Linux** ///
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes? OSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).OSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).OSType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes? OSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).OSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).OSType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes)""); } /// The privacy statement uri. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string PrivacyStatementUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PrivacyStatementUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PrivacyStatementUri = value ?? null; } + public string PrivacyStatementUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PrivacyStatementUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PrivacyStatementUri = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties _property; /// Describes the properties of a gallery image definition. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageProperties()); set => this._property = value; } /// The provisioning state, which only appears in the response. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).ProvisioningState; } /// The plan ID. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string PurchasePlanName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PurchasePlanName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PurchasePlanName = value ?? null; } + public string PurchasePlanName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PurchasePlanName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PurchasePlanName = value ?? null; } /// The product ID. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string PurchasePlanProduct { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PurchasePlanProduct; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PurchasePlanProduct = value ?? null; } + public string PurchasePlanProduct { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PurchasePlanProduct; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PurchasePlanProduct = value ?? null; } /// The publisher ID. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string PurchasePlanPublisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PurchasePlanPublisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PurchasePlanPublisher = value ?? null; } + public string PurchasePlanPublisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PurchasePlanPublisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PurchasePlanPublisher = value ?? null; } /// The release note uri. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string ReleaseNoteUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).ReleaseNoteUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).ReleaseNoteUri = value ?? null; } + public string ReleaseNoteUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).ReleaseNoteUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).ReleaseNoteUri = value ?? null; } /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] @@ -169,11 +173,11 @@ public partial class GalleryImage : /// The maximum number of the resource. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).VCpUsMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).VCpUsMax = value ?? default(int); } + public int? VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).VCpUsMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).VCpUsMax = value ?? default(int); } /// The minimum number of the resource. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).VCpUsMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).VCpUsMin = value ?? default(int); } + public int? VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).VCpUsMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).VCpUsMin = value ?? default(int); } /// Creates an new instance. public GalleryImage() @@ -185,7 +189,7 @@ public GalleryImage() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { @@ -198,6 +202,14 @@ public partial interface IGalleryImage : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResource { + /// The architecture of the image. Applicable to OS disks only. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The architecture of the image. Applicable to OS disks only.", + SerializedName = @"architecture", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture? Architecture { get; set; } /// /// The description of this gallery image definition resource. This property is updatable. /// @@ -241,8 +253,8 @@ public partial interface IGalleryImage : ReadOnly = false, Description = @"A list of gallery image features.", SerializedName = @"features", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature[] Feature { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature[] Feature { get; set; } /// The hypervisor generation of the Virtual Machine. Applicable to OS disks only. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, @@ -326,8 +338,8 @@ public partial interface IGalleryImage : ReadOnly = true, Description = @"The provisioning state, which only appears in the response.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(string) })] - string ProvisioningState { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; } /// The plan ID. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, @@ -382,12 +394,14 @@ public partial interface IGalleryImage : internal partial interface IGalleryImageInternal : Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal { + /// The architecture of the image. Applicable to OS disks only. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture? Architecture { get; set; } /// /// The description of this gallery image definition resource. This property is updatable. /// string Description { get; set; } /// Describes the disallowed disk types. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed Disallowed { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed Disallowed { get; set; } /// A list of disk types. string[] DisallowedDiskType { get; set; } /// @@ -398,11 +412,11 @@ internal partial interface IGalleryImageInternal : /// The Eula agreement for the gallery image definition. string Eula { get; set; } /// A list of gallery image features. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature[] Feature { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature[] Feature { get; set; } /// The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration? HyperVGeneration { get; set; } /// This is the gallery image definition identifier. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier Identifier { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier Identifier { get; set; } /// The name of the gallery image definition offer. string IdentifierOffer { get; set; } /// The name of the gallery image definition publisher. @@ -425,13 +439,13 @@ internal partial interface IGalleryImageInternal : /// The privacy statement uri. string PrivacyStatementUri { get; set; } /// Describes the properties of a gallery image definition. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties Property { get; set; } /// The provisioning state, which only appears in the response. - string ProvisioningState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; set; } /// /// Describes the gallery image definition purchase plan. This is used by marketplace images. /// - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan PurchasePlan { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan PurchasePlan { get; set; } /// The plan ID. string PurchasePlanName { get; set; } /// The product ID. @@ -441,11 +455,11 @@ internal partial interface IGalleryImageInternal : /// /// The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. /// - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration Recommended { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration Recommended { get; set; } /// Describes the resource range. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange RecommendedMemory { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange RecommendedMemory { get; set; } /// Describes the resource range. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange RecommendedVCpUs { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange RecommendedVCpUs { get; set; } /// The release note uri. string ReleaseNoteUri { get; set; } /// The maximum number of the resource. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImage.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.json.cs similarity index 91% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImage.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.json.cs index 364822ba90a7..8eaa2bdeea2c 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImage.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -22,7 +22,7 @@ public partial class GalleryImage partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -32,7 +32,8 @@ public partial class GalleryImage /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -44,7 +45,8 @@ public partial class GalleryImage /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -54,13 +56,13 @@ public partial class GalleryImage partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryImage(json) : null; } @@ -78,7 +80,7 @@ internal GalleryImage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.Js return; } __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageFeature.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageFeature.PowerShell.cs similarity index 73% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageFeature.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageFeature.PowerShell.cs index 64dc43e5c1c4..ca59459e9836 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageFeature.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageFeature.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class GalleryImageFeature /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class GalleryImageFeature /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class GalleryImageFeature partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GalleryImageFeature(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GalleryImageFeature(content); } @@ -82,11 +84,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGal /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -99,13 +101,19 @@ internal GalleryImageFeature(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeatureInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeatureInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeatureInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeatureInternal)this).Value, global::System.Convert.ToString); + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeatureInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeatureInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeatureInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeatureInternal)this).Value, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -118,8 +126,14 @@ internal GalleryImageFeature(global::System.Management.Automation.PSObject conte return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeatureInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeatureInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeatureInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeatureInternal)this).Value, global::System.Convert.ToString); + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeatureInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeatureInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeatureInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeatureInternal)this).Value, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageFeature.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageFeature.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageFeature.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageFeature.TypeConverter.cs index eabcaaf7b739..e4d3d74dceff 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageFeature.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageFeature.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryImageFeatureTypeConverter : global::System.Managemen { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageFeature.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageFeature.cs similarity index 97% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageFeature.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageFeature.cs index e817aa3d38c1..9705f26d41b6 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageFeature.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageFeature.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// A feature for gallery image. public partial class GalleryImageFeature : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeatureInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeatureInternal { /// Backing field for property. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageFeature.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageFeature.json.cs similarity index 92% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageFeature.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageFeature.json.cs index ea6747f318c4..436db84b57cb 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageFeature.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageFeature.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryImageFeature partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryImageFeature /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryImageFeature /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryImageFeature partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryImageFeature(json) : null; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageIdentifier.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageIdentifier.PowerShell.cs similarity index 68% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageIdentifier.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageIdentifier.PowerShell.cs index cbd2f29637b6..2d871ab72a9e 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageIdentifier.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageIdentifier.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class GalleryImageIdentifier /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class GalleryImageIdentifier /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class GalleryImageIdentifier partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GalleryImageIdentifier(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GalleryImageIdentifier(content); } @@ -82,11 +84,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGal /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -99,14 +101,23 @@ internal GalleryImageIdentifier(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifierInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifierInternal)this).Publisher, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifierInternal)this).Offer = (string) content.GetValueForProperty("Offer",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifierInternal)this).Offer, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifierInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifierInternal)this).Sku, global::System.Convert.ToString); + if (content.Contains("Publisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifierInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifierInternal)this).Publisher, global::System.Convert.ToString); + } + if (content.Contains("Offer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifierInternal)this).Offer = (string) content.GetValueForProperty("Offer",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifierInternal)this).Offer, global::System.Convert.ToString); + } + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifierInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifierInternal)this).Sku, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -119,9 +130,18 @@ internal GalleryImageIdentifier(global::System.Management.Automation.PSObject co return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifierInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifierInternal)this).Publisher, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifierInternal)this).Offer = (string) content.GetValueForProperty("Offer",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifierInternal)this).Offer, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifierInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifierInternal)this).Sku, global::System.Convert.ToString); + if (content.Contains("Publisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifierInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifierInternal)this).Publisher, global::System.Convert.ToString); + } + if (content.Contains("Offer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifierInternal)this).Offer = (string) content.GetValueForProperty("Offer",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifierInternal)this).Offer, global::System.Convert.ToString); + } + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifierInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifierInternal)this).Sku, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageIdentifier.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageIdentifier.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageIdentifier.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageIdentifier.TypeConverter.cs index 3d730707123f..4d8c1a4e4251 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageIdentifier.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageIdentifier.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryImageIdentifierTypeConverter : global::System.Manage { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageIdentifier.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageIdentifier.cs similarity index 98% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageIdentifier.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageIdentifier.cs index b9df5021874b..10a7f03b5b71 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageIdentifier.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageIdentifier.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// This is the gallery image definition identifier. public partial class GalleryImageIdentifier : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifierInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifierInternal { /// Backing field for property. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageIdentifier.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageIdentifier.json.cs similarity index 92% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageIdentifier.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageIdentifier.json.cs index ddb6881c3d3d..e2d8dccb51f0 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageIdentifier.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageIdentifier.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryImageIdentifier partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryImageIdentifier /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryImageIdentifier /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryImageIdentifier partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryImageIdentifier(json) : null; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageList.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageList.PowerShell.cs similarity index 69% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageList.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageList.PowerShell.cs index 0c523dc64eda..5b771964b130 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageList.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class GalleryImageList /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class GalleryImageList /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class GalleryImageList partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GalleryImageList(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GalleryImageList(content); } @@ -82,11 +84,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGal /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -99,13 +101,19 @@ internal GalleryImageList(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageListInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -118,8 +126,14 @@ internal GalleryImageList(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageListInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageList.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageList.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageList.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageList.TypeConverter.cs index 62ce2d38affa..aeb4c9171a41 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageList.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryImageListTypeConverter : global::System.Management.A { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageList.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageList.cs similarity index 92% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageList.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageList.cs index fc06c58302d8..a895b596da4d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageList.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageList.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// The List Gallery Images operation response. public partial class GalleryImageList : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageList, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageListInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageList, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageListInternal { /// Backing field for property. @@ -24,11 +24,11 @@ public partial class GalleryImageList : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage[] _value; /// A list of Shared Image Gallery images. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public GalleryImageList() @@ -57,8 +57,8 @@ public partial interface IGalleryImageList : ReadOnly = false, Description = @"A list of Shared Image Gallery images.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage[] Value { get; set; } } /// The List Gallery Images operation response. @@ -71,7 +71,7 @@ internal partial interface IGalleryImageListInternal /// string NextLink { get; set; } /// A list of Shared Image Gallery images. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage[] Value { get; set; } } } \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageList.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageList.json.cs similarity index 89% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageList.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageList.json.cs index 936cb86706c1..e38a1ed8aff2 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageList.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryImageList partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryImageList /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryImageList /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryImageList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageList FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageList FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryImageList(json) : null; } @@ -75,7 +77,7 @@ internal GalleryImageList(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Jso { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImage) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImage.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImage.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageProperties.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageProperties.PowerShell.cs new file mode 100644 index 000000000000..a98fd73a60ca --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageProperties.PowerShell.cs @@ -0,0 +1,360 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Describes the properties of a gallery image definition. + [System.ComponentModel.TypeConverter(typeof(GalleryImagePropertiesTypeConverter))] + public partial class GalleryImageProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryImageProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryImageProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryImageProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Identifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageIdentifierTypeConverter.ConvertFrom); + } + if (content.Contains("Recommended")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Recommended = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration) content.GetValueForProperty("Recommended",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Recommended, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RecommendedMachineConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("Disallowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Disallowed = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed) content.GetValueForProperty("Disallowed",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Disallowed, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DisallowedTypeConverter.ConvertFrom); + } + if (content.Contains("PurchasePlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PurchasePlan = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan) content.GetValueForProperty("PurchasePlan",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PurchasePlan, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ImagePurchasePlanTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Eula")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Eula, global::System.Convert.ToString); + } + if (content.Contains("PrivacyStatementUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PrivacyStatementUri, global::System.Convert.ToString); + } + if (content.Contains("ReleaseNoteUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).ReleaseNoteUri, global::System.Convert.ToString); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); + } + if (content.Contains("OSState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).OSState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes) content.GetValueForProperty("OSState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).OSState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes.CreateFrom); + } + if (content.Contains("HyperVGeneration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).HyperVGeneration = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration?) content.GetValueForProperty("HyperVGeneration",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).HyperVGeneration, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration.CreateFrom); + } + if (content.Contains("EndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("Feature")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Feature = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature[]) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Feature, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageFeatureTypeConverter.ConvertFrom)); + } + if (content.Contains("Architecture")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Architecture = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture?) content.GetValueForProperty("Architecture",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Architecture, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture.CreateFrom); + } + if (content.Contains("DisallowedDiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).DisallowedDiskType = (string[]) content.GetValueForProperty("DisallowedDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).DisallowedDiskType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("IdentifierPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).IdentifierPublisher = (string) content.GetValueForProperty("IdentifierPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).IdentifierPublisher, global::System.Convert.ToString); + } + if (content.Contains("IdentifierOffer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).IdentifierOffer = (string) content.GetValueForProperty("IdentifierOffer",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).IdentifierOffer, global::System.Convert.ToString); + } + if (content.Contains("IdentifierSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).IdentifierSku = (string) content.GetValueForProperty("IdentifierSku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).IdentifierSku, global::System.Convert.ToString); + } + if (content.Contains("RecommendedVCpUs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).RecommendedVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange) content.GetValueForProperty("RecommendedVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).RecommendedVCpUs, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("RecommendedMemory")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).RecommendedMemory = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange) content.GetValueForProperty("RecommendedMemory",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).RecommendedMemory, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("PurchasePlanName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PurchasePlanName = (string) content.GetValueForProperty("PurchasePlanName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PurchasePlanName, global::System.Convert.ToString); + } + if (content.Contains("PurchasePlanPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PurchasePlanPublisher = (string) content.GetValueForProperty("PurchasePlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PurchasePlanPublisher, global::System.Convert.ToString); + } + if (content.Contains("PurchasePlanProduct")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PurchasePlanProduct = (string) content.GetValueForProperty("PurchasePlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PurchasePlanProduct, global::System.Convert.ToString); + } + if (content.Contains("VCpUsMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VCpUsMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryImageProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Identifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageIdentifierTypeConverter.ConvertFrom); + } + if (content.Contains("Recommended")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Recommended = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration) content.GetValueForProperty("Recommended",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Recommended, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RecommendedMachineConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("Disallowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Disallowed = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed) content.GetValueForProperty("Disallowed",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Disallowed, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DisallowedTypeConverter.ConvertFrom); + } + if (content.Contains("PurchasePlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PurchasePlan = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan) content.GetValueForProperty("PurchasePlan",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PurchasePlan, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ImagePurchasePlanTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Eula")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Eula, global::System.Convert.ToString); + } + if (content.Contains("PrivacyStatementUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PrivacyStatementUri, global::System.Convert.ToString); + } + if (content.Contains("ReleaseNoteUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).ReleaseNoteUri, global::System.Convert.ToString); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); + } + if (content.Contains("OSState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).OSState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes) content.GetValueForProperty("OSState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).OSState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes.CreateFrom); + } + if (content.Contains("HyperVGeneration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).HyperVGeneration = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration?) content.GetValueForProperty("HyperVGeneration",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).HyperVGeneration, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration.CreateFrom); + } + if (content.Contains("EndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("Feature")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Feature = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature[]) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Feature, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageFeatureTypeConverter.ConvertFrom)); + } + if (content.Contains("Architecture")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Architecture = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture?) content.GetValueForProperty("Architecture",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).Architecture, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture.CreateFrom); + } + if (content.Contains("DisallowedDiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).DisallowedDiskType = (string[]) content.GetValueForProperty("DisallowedDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).DisallowedDiskType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("IdentifierPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).IdentifierPublisher = (string) content.GetValueForProperty("IdentifierPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).IdentifierPublisher, global::System.Convert.ToString); + } + if (content.Contains("IdentifierOffer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).IdentifierOffer = (string) content.GetValueForProperty("IdentifierOffer",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).IdentifierOffer, global::System.Convert.ToString); + } + if (content.Contains("IdentifierSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).IdentifierSku = (string) content.GetValueForProperty("IdentifierSku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).IdentifierSku, global::System.Convert.ToString); + } + if (content.Contains("RecommendedVCpUs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).RecommendedVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange) content.GetValueForProperty("RecommendedVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).RecommendedVCpUs, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("RecommendedMemory")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).RecommendedMemory = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange) content.GetValueForProperty("RecommendedMemory",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).RecommendedMemory, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("PurchasePlanName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PurchasePlanName = (string) content.GetValueForProperty("PurchasePlanName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PurchasePlanName, global::System.Convert.ToString); + } + if (content.Contains("PurchasePlanPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PurchasePlanPublisher = (string) content.GetValueForProperty("PurchasePlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PurchasePlanPublisher, global::System.Convert.ToString); + } + if (content.Contains("PurchasePlanProduct")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PurchasePlanProduct = (string) content.GetValueForProperty("PurchasePlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).PurchasePlanProduct, global::System.Convert.ToString); + } + if (content.Contains("VCpUsMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VCpUsMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Describes the properties of a gallery image definition. + [System.ComponentModel.TypeConverter(typeof(GalleryImagePropertiesTypeConverter))] + public partial interface IGalleryImageProperties + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageProperties.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageProperties.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageProperties.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageProperties.TypeConverter.cs index a71f1ddff379..ea0917c68da0 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageProperties.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryImagePropertiesTypeConverter : global::System.Manage { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageProperties.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageProperties.cs similarity index 81% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageProperties.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageProperties.cs index 04795fc20816..e8f8cc7d2e70 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageProperties.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageProperties.cs @@ -3,16 +3,23 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// Describes the properties of a gallery image definition. public partial class GalleryImageProperties : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal { + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture? _architecture; + + /// The architecture of the image. Applicable to OS disks only. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture? Architecture { get => this._architecture; set => this._architecture = value; } + /// Backing field for property. private string _description; @@ -23,15 +30,15 @@ public partial class GalleryImageProperties : public string Description { get => this._description; set => this._description = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed _disallowed; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed _disallowed; /// Describes the disallowed disk types. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed Disallowed { get => (this._disallowed = this._disallowed ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Disallowed()); set => this._disallowed = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed Disallowed { get => (this._disallowed = this._disallowed ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Disallowed()); set => this._disallowed = value; } /// A list of disk types. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string[] DisallowedDiskType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowedInternal)Disallowed).DiskType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowedInternal)Disallowed).DiskType = value ?? null /* arrayOf */; } + public string[] DisallowedDiskType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowedInternal)Disallowed).DiskType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowedInternal)Disallowed).DiskType = value ?? null /* arrayOf */; } /// Backing field for property. private global::System.DateTime? _endOfLifeDate; @@ -51,11 +58,11 @@ public partial class GalleryImageProperties : public string Eula { get => this._eula; set => this._eula = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature[] _feature; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature[] _feature; /// A list of gallery image features. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature[] Feature { get => this._feature; set => this._feature = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature[] Feature { get => this._feature; set => this._feature = value; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration? _hyperVGeneration; @@ -65,52 +72,52 @@ public partial class GalleryImageProperties : public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration? HyperVGeneration { get => this._hyperVGeneration; set => this._hyperVGeneration = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier _identifier; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier _identifier; /// This is the gallery image definition identifier. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier Identifier { get => (this._identifier = this._identifier ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageIdentifier()); set => this._identifier = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier Identifier { get => (this._identifier = this._identifier ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageIdentifier()); set => this._identifier = value; } /// The name of the gallery image definition offer. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string IdentifierOffer { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifierInternal)Identifier).Offer; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifierInternal)Identifier).Offer = value ; } + public string IdentifierOffer { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifierInternal)Identifier).Offer; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifierInternal)Identifier).Offer = value ; } /// The name of the gallery image definition publisher. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string IdentifierPublisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifierInternal)Identifier).Publisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifierInternal)Identifier).Publisher = value ; } + public string IdentifierPublisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifierInternal)Identifier).Publisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifierInternal)Identifier).Publisher = value ; } /// The name of the gallery image definition SKU. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string IdentifierSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifierInternal)Identifier).Sku; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifierInternal)Identifier).Sku = value ; } + public string IdentifierSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifierInternal)Identifier).Sku; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifierInternal)Identifier).Sku = value ; } /// The maximum number of the resource. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)Recommended).MemoryMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)Recommended).MemoryMax = value ?? default(int); } + public int? MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)Recommended).MemoryMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)Recommended).MemoryMax = value ?? default(int); } /// The minimum number of the resource. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)Recommended).MemoryMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)Recommended).MemoryMin = value ?? default(int); } + public int? MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)Recommended).MemoryMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)Recommended).MemoryMin = value ?? default(int); } /// Internal Acessors for Disallowed - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal.Disallowed { get => (this._disallowed = this._disallowed ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Disallowed()); set { {_disallowed = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal.Disallowed { get => (this._disallowed = this._disallowed ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Disallowed()); set { {_disallowed = value;} } } /// Internal Acessors for Identifier - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal.Identifier { get => (this._identifier = this._identifier ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageIdentifier()); set { {_identifier = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal.Identifier { get => (this._identifier = this._identifier ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageIdentifier()); set { {_identifier = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for PurchasePlan - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal.PurchasePlan { get => (this._purchasePlan = this._purchasePlan ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ImagePurchasePlan()); set { {_purchasePlan = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal.PurchasePlan { get => (this._purchasePlan = this._purchasePlan ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ImagePurchasePlan()); set { {_purchasePlan = value;} } } /// Internal Acessors for Recommended - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal.Recommended { get => (this._recommended = this._recommended ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RecommendedMachineConfiguration()); set { {_recommended = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal.Recommended { get => (this._recommended = this._recommended ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RecommendedMachineConfiguration()); set { {_recommended = value;} } } /// Internal Acessors for RecommendedMemory - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal.RecommendedMemory { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)Recommended).Memory; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)Recommended).Memory = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal.RecommendedMemory { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)Recommended).Memory; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)Recommended).Memory = value; } /// Internal Acessors for RecommendedVCpUs - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal.RecommendedVCpUs { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)Recommended).VCpUs; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)Recommended).VCpUs = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal.RecommendedVCpUs { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)Recommended).VCpUs; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)Recommended).VCpUs = value; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes _oSState; @@ -139,41 +146,41 @@ public partial class GalleryImageProperties : public string PrivacyStatementUri { get => this._privacyStatementUri; set => this._privacyStatementUri = value; } /// Backing field for property. - private string _provisioningState; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? _provisioningState; /// The provisioning state, which only appears in the response. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - public string ProvisioningState { get => this._provisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get => this._provisioningState; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan _purchasePlan; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan _purchasePlan; /// /// Describes the gallery image definition purchase plan. This is used by marketplace images. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan PurchasePlan { get => (this._purchasePlan = this._purchasePlan ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ImagePurchasePlan()); set => this._purchasePlan = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan PurchasePlan { get => (this._purchasePlan = this._purchasePlan ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ImagePurchasePlan()); set => this._purchasePlan = value; } /// The plan ID. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string PurchasePlanName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlanInternal)PurchasePlan).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlanInternal)PurchasePlan).Name = value ?? null; } + public string PurchasePlanName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlanInternal)PurchasePlan).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlanInternal)PurchasePlan).Name = value ?? null; } /// The product ID. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string PurchasePlanProduct { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlanInternal)PurchasePlan).Product; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlanInternal)PurchasePlan).Product = value ?? null; } + public string PurchasePlanProduct { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlanInternal)PurchasePlan).Product; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlanInternal)PurchasePlan).Product = value ?? null; } /// The publisher ID. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string PurchasePlanPublisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlanInternal)PurchasePlan).Publisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlanInternal)PurchasePlan).Publisher = value ?? null; } + public string PurchasePlanPublisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlanInternal)PurchasePlan).Publisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlanInternal)PurchasePlan).Publisher = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration _recommended; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration _recommended; /// /// The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration Recommended { get => (this._recommended = this._recommended ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RecommendedMachineConfiguration()); set => this._recommended = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration Recommended { get => (this._recommended = this._recommended ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RecommendedMachineConfiguration()); set => this._recommended = value; } /// Backing field for property. private string _releaseNoteUri; @@ -184,11 +191,11 @@ public partial class GalleryImageProperties : /// The maximum number of the resource. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)Recommended).VCpUsMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)Recommended).VCpUsMax = value ?? default(int); } + public int? VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)Recommended).VCpUsMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)Recommended).VCpUsMax = value ?? default(int); } /// The minimum number of the resource. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)Recommended).VCpUsMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)Recommended).VCpUsMin = value ?? default(int); } + public int? VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)Recommended).VCpUsMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)Recommended).VCpUsMin = value ?? default(int); } /// Creates an new instance. public GalleryImageProperties() @@ -200,6 +207,14 @@ public GalleryImageProperties() public partial interface IGalleryImageProperties : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable { + /// The architecture of the image. Applicable to OS disks only. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The architecture of the image. Applicable to OS disks only.", + SerializedName = @"architecture", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture? Architecture { get; set; } /// /// The description of this gallery image definition resource. This property is updatable. /// @@ -243,8 +258,8 @@ public partial interface IGalleryImageProperties : ReadOnly = false, Description = @"A list of gallery image features.", SerializedName = @"features", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature[] Feature { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature[] Feature { get; set; } /// The hypervisor generation of the Virtual Machine. Applicable to OS disks only. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, @@ -328,8 +343,8 @@ public partial interface IGalleryImageProperties : ReadOnly = true, Description = @"The provisioning state, which only appears in the response.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(string) })] - string ProvisioningState { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; } /// The plan ID. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, @@ -384,12 +399,14 @@ public partial interface IGalleryImageProperties : internal partial interface IGalleryImagePropertiesInternal { + /// The architecture of the image. Applicable to OS disks only. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture? Architecture { get; set; } /// /// The description of this gallery image definition resource. This property is updatable. /// string Description { get; set; } /// Describes the disallowed disk types. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed Disallowed { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed Disallowed { get; set; } /// A list of disk types. string[] DisallowedDiskType { get; set; } /// @@ -400,11 +417,11 @@ internal partial interface IGalleryImagePropertiesInternal /// The Eula agreement for the gallery image definition. string Eula { get; set; } /// A list of gallery image features. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature[] Feature { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature[] Feature { get; set; } /// The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration? HyperVGeneration { get; set; } /// This is the gallery image definition identifier. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier Identifier { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier Identifier { get; set; } /// The name of the gallery image definition offer. string IdentifierOffer { get; set; } /// The name of the gallery image definition publisher. @@ -427,11 +444,11 @@ internal partial interface IGalleryImagePropertiesInternal /// The privacy statement uri. string PrivacyStatementUri { get; set; } /// The provisioning state, which only appears in the response. - string ProvisioningState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; set; } /// /// Describes the gallery image definition purchase plan. This is used by marketplace images. /// - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan PurchasePlan { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan PurchasePlan { get; set; } /// The plan ID. string PurchasePlanName { get; set; } /// The product ID. @@ -441,11 +458,11 @@ internal partial interface IGalleryImagePropertiesInternal /// /// The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. /// - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration Recommended { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration Recommended { get; set; } /// Describes the resource range. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange RecommendedMemory { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange RecommendedMemory { get; set; } /// Describes the resource range. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange RecommendedVCpUs { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange RecommendedVCpUs { get; set; } /// The release note uri. string ReleaseNoteUri { get; set; } /// The maximum number of the resource. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageProperties.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageProperties.json.cs similarity index 89% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageProperties.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageProperties.json.cs index af5027f6ca97..2ec2bc0299e1 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageProperties.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryImageProperties partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryImageProperties /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryImageProperties /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryImageProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryImageProperties(json) : null; } @@ -75,10 +77,10 @@ internal GalleryImageProperties(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runti { return; } - {_identifier = If( json?.PropertyT("identifier"), out var __jsonIdentifier) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageIdentifier.FromJson(__jsonIdentifier) : Identifier;} - {_recommended = If( json?.PropertyT("recommended"), out var __jsonRecommended) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RecommendedMachineConfiguration.FromJson(__jsonRecommended) : Recommended;} - {_disallowed = If( json?.PropertyT("disallowed"), out var __jsonDisallowed) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Disallowed.FromJson(__jsonDisallowed) : Disallowed;} - {_purchasePlan = If( json?.PropertyT("purchasePlan"), out var __jsonPurchasePlan) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ImagePurchasePlan.FromJson(__jsonPurchasePlan) : PurchasePlan;} + {_identifier = If( json?.PropertyT("identifier"), out var __jsonIdentifier) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageIdentifier.FromJson(__jsonIdentifier) : Identifier;} + {_recommended = If( json?.PropertyT("recommended"), out var __jsonRecommended) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RecommendedMachineConfiguration.FromJson(__jsonRecommended) : Recommended;} + {_disallowed = If( json?.PropertyT("disallowed"), out var __jsonDisallowed) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Disallowed.FromJson(__jsonDisallowed) : Disallowed;} + {_purchasePlan = If( json?.PropertyT("purchasePlan"), out var __jsonPurchasePlan) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ImagePurchasePlan.FromJson(__jsonPurchasePlan) : PurchasePlan;} {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} {_eula = If( json?.PropertyT("eula"), out var __jsonEula) ? (string)__jsonEula : (string)Eula;} {_privacyStatementUri = If( json?.PropertyT("privacyStatementUri"), out var __jsonPrivacyStatementUri) ? (string)__jsonPrivacyStatementUri : (string)PrivacyStatementUri;} @@ -88,7 +90,8 @@ internal GalleryImageProperties(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runti {_hyperVGeneration = If( json?.PropertyT("hyperVGeneration"), out var __jsonHyperVGeneration) ? (string)__jsonHyperVGeneration : (string)HyperVGeneration;} {_endOfLifeDate = If( json?.PropertyT("endOfLifeDate"), out var __jsonEndOfLifeDate) ? global::System.DateTime.TryParse((string)__jsonEndOfLifeDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndOfLifeDateValue) ? __jsonEndOfLifeDateValue : EndOfLifeDate : EndOfLifeDate;} {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_feature = If( json?.PropertyT("features"), out var __jsonFeatures) ? If( __jsonFeatures as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageFeature.FromJson(__u) )) ))() : null : Feature;} + {_feature = If( json?.PropertyT("features"), out var __jsonFeatures) ? If( __jsonFeatures as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageFeature.FromJson(__u) )) ))() : null : Feature;} + {_architecture = If( json?.PropertyT("architecture"), out var __jsonArchitecture) ? (string)__jsonArchitecture : (string)Architecture;} AfterFromJson(json); } @@ -136,6 +139,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode ToJson(M } container.Add("features",__w); } + AddIf( null != (((object)this._architecture)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._architecture.ToString()) : null, "architecture" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageUpdate.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageUpdate.PowerShell.cs new file mode 100644 index 000000000000..3e7fe7a32fef --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageUpdate.PowerShell.cs @@ -0,0 +1,402 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// Specifies information about the gallery image definition that you want to update. + /// + [System.ComponentModel.TypeConverter(typeof(GalleryImageUpdateTypeConverter))] + public partial class GalleryImageUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryImageUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryImageUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryImageUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImagePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Disallowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Disallowed = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed) content.GetValueForProperty("Disallowed",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Disallowed, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DisallowedTypeConverter.ConvertFrom); + } + if (content.Contains("Architecture")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Architecture = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture?) content.GetValueForProperty("Architecture",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Architecture, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture.CreateFrom); + } + if (content.Contains("Identifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageIdentifierTypeConverter.ConvertFrom); + } + if (content.Contains("Recommended")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Recommended = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration) content.GetValueForProperty("Recommended",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Recommended, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RecommendedMachineConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("PurchasePlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PurchasePlan = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan) content.GetValueForProperty("PurchasePlan",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PurchasePlan, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ImagePurchasePlanTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Eula")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Eula, global::System.Convert.ToString); + } + if (content.Contains("PrivacyStatementUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PrivacyStatementUri, global::System.Convert.ToString); + } + if (content.Contains("ReleaseNoteUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).ReleaseNoteUri, global::System.Convert.ToString); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); + } + if (content.Contains("OSState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).OSState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes) content.GetValueForProperty("OSState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).OSState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes.CreateFrom); + } + if (content.Contains("HyperVGeneration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).HyperVGeneration = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration?) content.GetValueForProperty("HyperVGeneration",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).HyperVGeneration, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration.CreateFrom); + } + if (content.Contains("EndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("Feature")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Feature = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature[]) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Feature, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageFeatureTypeConverter.ConvertFrom)); + } + if (content.Contains("DisallowedDiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).DisallowedDiskType = (string[]) content.GetValueForProperty("DisallowedDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).DisallowedDiskType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("IdentifierPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).IdentifierPublisher = (string) content.GetValueForProperty("IdentifierPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).IdentifierPublisher, global::System.Convert.ToString); + } + if (content.Contains("IdentifierOffer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).IdentifierOffer = (string) content.GetValueForProperty("IdentifierOffer",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).IdentifierOffer, global::System.Convert.ToString); + } + if (content.Contains("IdentifierSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).IdentifierSku = (string) content.GetValueForProperty("IdentifierSku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).IdentifierSku, global::System.Convert.ToString); + } + if (content.Contains("RecommendedVCpUs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).RecommendedVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange) content.GetValueForProperty("RecommendedVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).RecommendedVCpUs, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("RecommendedMemory")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).RecommendedMemory = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange) content.GetValueForProperty("RecommendedMemory",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).RecommendedMemory, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("PurchasePlanName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PurchasePlanName = (string) content.GetValueForProperty("PurchasePlanName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PurchasePlanName, global::System.Convert.ToString); + } + if (content.Contains("PurchasePlanPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PurchasePlanPublisher = (string) content.GetValueForProperty("PurchasePlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PurchasePlanPublisher, global::System.Convert.ToString); + } + if (content.Contains("PurchasePlanProduct")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PurchasePlanProduct = (string) content.GetValueForProperty("PurchasePlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PurchasePlanProduct, global::System.Convert.ToString); + } + if (content.Contains("VCpUsMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VCpUsMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryImageUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImagePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Disallowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Disallowed = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed) content.GetValueForProperty("Disallowed",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Disallowed, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DisallowedTypeConverter.ConvertFrom); + } + if (content.Contains("Architecture")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Architecture = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture?) content.GetValueForProperty("Architecture",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Architecture, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture.CreateFrom); + } + if (content.Contains("Identifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageIdentifierTypeConverter.ConvertFrom); + } + if (content.Contains("Recommended")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Recommended = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration) content.GetValueForProperty("Recommended",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Recommended, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RecommendedMachineConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("PurchasePlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PurchasePlan = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan) content.GetValueForProperty("PurchasePlan",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PurchasePlan, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ImagePurchasePlanTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Eula")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Eula = (string) content.GetValueForProperty("Eula",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Eula, global::System.Convert.ToString); + } + if (content.Contains("PrivacyStatementUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PrivacyStatementUri = (string) content.GetValueForProperty("PrivacyStatementUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PrivacyStatementUri, global::System.Convert.ToString); + } + if (content.Contains("ReleaseNoteUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).ReleaseNoteUri = (string) content.GetValueForProperty("ReleaseNoteUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).ReleaseNoteUri, global::System.Convert.ToString); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes.CreateFrom); + } + if (content.Contains("OSState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).OSState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes) content.GetValueForProperty("OSState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).OSState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes.CreateFrom); + } + if (content.Contains("HyperVGeneration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).HyperVGeneration = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration?) content.GetValueForProperty("HyperVGeneration",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).HyperVGeneration, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration.CreateFrom); + } + if (content.Contains("EndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("Feature")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Feature = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature[]) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).Feature, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageFeatureTypeConverter.ConvertFrom)); + } + if (content.Contains("DisallowedDiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).DisallowedDiskType = (string[]) content.GetValueForProperty("DisallowedDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).DisallowedDiskType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("IdentifierPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).IdentifierPublisher = (string) content.GetValueForProperty("IdentifierPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).IdentifierPublisher, global::System.Convert.ToString); + } + if (content.Contains("IdentifierOffer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).IdentifierOffer = (string) content.GetValueForProperty("IdentifierOffer",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).IdentifierOffer, global::System.Convert.ToString); + } + if (content.Contains("IdentifierSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).IdentifierSku = (string) content.GetValueForProperty("IdentifierSku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).IdentifierSku, global::System.Convert.ToString); + } + if (content.Contains("RecommendedVCpUs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).RecommendedVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange) content.GetValueForProperty("RecommendedVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).RecommendedVCpUs, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("RecommendedMemory")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).RecommendedMemory = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange) content.GetValueForProperty("RecommendedMemory",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).RecommendedMemory, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("PurchasePlanName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PurchasePlanName = (string) content.GetValueForProperty("PurchasePlanName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PurchasePlanName, global::System.Convert.ToString); + } + if (content.Contains("PurchasePlanPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PurchasePlanPublisher = (string) content.GetValueForProperty("PurchasePlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PurchasePlanPublisher, global::System.Convert.ToString); + } + if (content.Contains("PurchasePlanProduct")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PurchasePlanProduct = (string) content.GetValueForProperty("PurchasePlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).PurchasePlanProduct, global::System.Convert.ToString); + } + if (content.Contains("VCpUsMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VCpUsMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Specifies information about the gallery image definition that you want to update. + [System.ComponentModel.TypeConverter(typeof(GalleryImageUpdateTypeConverter))] + public partial interface IGalleryImageUpdate + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageUpdate.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageUpdate.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageUpdate.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageUpdate.TypeConverter.cs index 1c4ba74c7efe..38265d9b4585 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageUpdate.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryImageUpdateTypeConverter : global::System.Management { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageUpdate.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageUpdate.cs similarity index 76% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageUpdate.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageUpdate.cs index 5e611a20e0e1..f650506ed14a 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageUpdate.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageUpdate.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -11,165 +11,169 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 /// Specifies information about the gallery image definition that you want to update. /// public partial class GalleryImageUpdate : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdate, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinition __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinition(); + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinition __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinition(); + + /// The architecture of the image. Applicable to OS disks only. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture? Architecture { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Architecture; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Architecture = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture)""); } /// /// The description of this gallery image definition resource. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Description = value ?? null; } + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Description = value ?? null; } /// A list of disk types. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string[] DisallowedDiskType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).DisallowedDiskType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).DisallowedDiskType = value ?? null /* arrayOf */; } + public string[] DisallowedDiskType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).DisallowedDiskType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).DisallowedDiskType = value ?? null /* arrayOf */; } /// /// The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property /// is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public global::System.DateTime? EndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).EndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).EndOfLifeDate = value ?? default(global::System.DateTime); } + public global::System.DateTime? EndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).EndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).EndOfLifeDate = value ?? default(global::System.DateTime); } /// The Eula agreement for the gallery image definition. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Eula { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Eula; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Eula = value ?? null; } + public string Eula { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Eula; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Eula = value ?? null; } /// A list of gallery image features. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature[] Feature { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Feature; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Feature = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature[] Feature { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Feature; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Feature = value ?? null /* arrayOf */; } /// The hypervisor generation of the Virtual Machine. Applicable to OS disks only. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration? HyperVGeneration { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).HyperVGeneration; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).HyperVGeneration = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration? HyperVGeneration { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).HyperVGeneration; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).HyperVGeneration = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration)""); } /// Resource Id [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; } /// The name of the gallery image definition offer. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string IdentifierOffer { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).IdentifierOffer; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).IdentifierOffer = value ?? null; } + public string IdentifierOffer { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).IdentifierOffer; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).IdentifierOffer = value ?? null; } /// The name of the gallery image definition publisher. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string IdentifierPublisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).IdentifierPublisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).IdentifierPublisher = value ?? null; } + public string IdentifierPublisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).IdentifierPublisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).IdentifierPublisher = value ?? null; } /// The name of the gallery image definition SKU. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string IdentifierSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).IdentifierSku; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).IdentifierSku = value ?? null; } + public string IdentifierSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).IdentifierSku; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).IdentifierSku = value ?? null; } /// The maximum number of the resource. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).MemoryMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).MemoryMax = value ?? default(int); } + public int? MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).MemoryMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).MemoryMax = value ?? default(int); } /// The minimum number of the resource. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).MemoryMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).MemoryMin = value ?? default(int); } + public int? MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).MemoryMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).MemoryMin = value ?? default(int); } /// Internal Acessors for Disallowed - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal.Disallowed { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Disallowed; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Disallowed = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal.Disallowed { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Disallowed; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Disallowed = value; } /// Internal Acessors for Identifier - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal.Identifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Identifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Identifier = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal.Identifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Identifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Identifier = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for PurchasePlan - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal.PurchasePlan { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PurchasePlan; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PurchasePlan = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal.PurchasePlan { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PurchasePlan; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PurchasePlan = value; } /// Internal Acessors for Recommended - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal.Recommended { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Recommended; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).Recommended = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal.Recommended { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Recommended; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Recommended = value; } /// Internal Acessors for RecommendedMemory - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal.RecommendedMemory { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).RecommendedMemory; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).RecommendedMemory = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal.RecommendedMemory { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).RecommendedMemory; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).RecommendedMemory = value; } /// Internal Acessors for RecommendedVCpUs - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdateInternal.RecommendedVCpUs { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).RecommendedVCpUs; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).RecommendedVCpUs = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdateInternal.RecommendedVCpUs { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).RecommendedVCpUs; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).RecommendedVCpUs = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type = value; } /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; } /// /// This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes? OSState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).OSState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).OSState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes? OSState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).OSState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).OSState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes)""); } /// /// This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed /// image.

Possible values are:

**Windows**

**Linux** ///
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes? OSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).OSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).OSType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes? OSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).OSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).OSType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes)""); } /// The privacy statement uri. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string PrivacyStatementUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PrivacyStatementUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PrivacyStatementUri = value ?? null; } + public string PrivacyStatementUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PrivacyStatementUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PrivacyStatementUri = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties _property; /// Describes the properties of a gallery image definition. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageProperties()); set => this._property = value; } /// The provisioning state, which only appears in the response. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).ProvisioningState; } /// The plan ID. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string PurchasePlanName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PurchasePlanName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PurchasePlanName = value ?? null; } + public string PurchasePlanName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PurchasePlanName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PurchasePlanName = value ?? null; } /// The product ID. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string PurchasePlanProduct { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PurchasePlanProduct; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PurchasePlanProduct = value ?? null; } + public string PurchasePlanProduct { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PurchasePlanProduct; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PurchasePlanProduct = value ?? null; } /// The publisher ID. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string PurchasePlanPublisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PurchasePlanPublisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).PurchasePlanPublisher = value ?? null; } + public string PurchasePlanPublisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PurchasePlanPublisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).PurchasePlanPublisher = value ?? null; } /// The release note uri. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string ReleaseNoteUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).ReleaseNoteUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).ReleaseNoteUri = value ?? null; } + public string ReleaseNoteUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).ReleaseNoteUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).ReleaseNoteUri = value ?? null; } /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag = value ?? null /* model class */; } /// Resource type [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; } /// The maximum number of the resource. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).VCpUsMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).VCpUsMax = value ?? default(int); } + public int? VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).VCpUsMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).VCpUsMax = value ?? default(int); } /// The minimum number of the resource. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).VCpUsMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImagePropertiesInternal)Property).VCpUsMin = value ?? default(int); } + public int? VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).VCpUsMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).VCpUsMin = value ?? default(int); } /// Creates an new instance. public GalleryImageUpdate() @@ -181,7 +185,7 @@ public GalleryImageUpdate() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { @@ -192,8 +196,16 @@ public GalleryImageUpdate() /// Specifies information about the gallery image definition that you want to update. public partial interface IGalleryImageUpdate : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinition + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinition { + /// The architecture of the image. Applicable to OS disks only. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The architecture of the image. Applicable to OS disks only.", + SerializedName = @"architecture", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture? Architecture { get; set; } /// /// The description of this gallery image definition resource. This property is updatable. /// @@ -237,8 +249,8 @@ public partial interface IGalleryImageUpdate : ReadOnly = false, Description = @"A list of gallery image features.", SerializedName = @"features", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature[] Feature { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature[] Feature { get; set; } /// The hypervisor generation of the Virtual Machine. Applicable to OS disks only. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, @@ -322,8 +334,8 @@ public partial interface IGalleryImageUpdate : ReadOnly = true, Description = @"The provisioning state, which only appears in the response.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(string) })] - string ProvisioningState { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; } /// The plan ID. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, @@ -376,14 +388,16 @@ public partial interface IGalleryImageUpdate : } /// Specifies information about the gallery image definition that you want to update. internal partial interface IGalleryImageUpdateInternal : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal { + /// The architecture of the image. Applicable to OS disks only. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture? Architecture { get; set; } /// /// The description of this gallery image definition resource. This property is updatable. /// string Description { get; set; } /// Describes the disallowed disk types. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDisallowed Disallowed { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed Disallowed { get; set; } /// A list of disk types. string[] DisallowedDiskType { get; set; } /// @@ -394,11 +408,11 @@ internal partial interface IGalleryImageUpdateInternal : /// The Eula agreement for the gallery image definition. string Eula { get; set; } /// A list of gallery image features. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageFeature[] Feature { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageFeature[] Feature { get; set; } /// The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration? HyperVGeneration { get; set; } /// This is the gallery image definition identifier. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageIdentifier Identifier { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageIdentifier Identifier { get; set; } /// The name of the gallery image definition offer. string IdentifierOffer { get; set; } /// The name of the gallery image definition publisher. @@ -421,13 +435,13 @@ internal partial interface IGalleryImageUpdateInternal : /// The privacy statement uri. string PrivacyStatementUri { get; set; } /// Describes the properties of a gallery image definition. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageProperties Property { get; set; } /// The provisioning state, which only appears in the response. - string ProvisioningState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; set; } /// /// Describes the gallery image definition purchase plan. This is used by marketplace images. /// - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan PurchasePlan { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan PurchasePlan { get; set; } /// The plan ID. string PurchasePlanName { get; set; } /// The product ID. @@ -437,11 +451,11 @@ internal partial interface IGalleryImageUpdateInternal : /// /// The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. /// - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration Recommended { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration Recommended { get; set; } /// Describes the resource range. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange RecommendedMemory { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange RecommendedMemory { get; set; } /// Describes the resource range. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange RecommendedVCpUs { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange RecommendedVCpUs { get; set; } /// The release note uri. string ReleaseNoteUri { get; set; } /// The maximum number of the resource. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageUpdate.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageUpdate.json.cs similarity index 90% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageUpdate.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageUpdate.json.cs index 3f8cf1a9b6aa..74ce86d5b183 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageUpdate.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -22,7 +22,7 @@ public partial class GalleryImageUpdate partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -32,7 +32,8 @@ public partial class GalleryImageUpdate /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -44,7 +45,8 @@ public partial class GalleryImageUpdate /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -54,13 +56,13 @@ public partial class GalleryImageUpdate partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryImageUpdate(json) : null; } @@ -77,8 +79,8 @@ internal GalleryImageUpdate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.J { return; } - __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinition(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageProperties.FromJson(__jsonProperties) : Property;} + __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinition(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.PowerShell.cs new file mode 100644 index 000000000000..6cbf649cc381 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.PowerShell.cs @@ -0,0 +1,378 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// Specifies information about the gallery image version that you want to create or update. + /// + [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionTypeConverter))] + public partial class GalleryImageVersion + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryImageVersion(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryImageVersion(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryImageVersion(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("ReplicationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatusTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactPublishingProfileBaseTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionStorageProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("PublishingProfileReplicationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); + } + if (content.Contains("ReplicationStatusSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalReplicationStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("PublishingProfileTargetRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileTargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]) content.GetValueForProperty("PublishingProfileTargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileTargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegionTypeConverter.ConvertFrom)); + } + if (content.Contains("PublishingProfileReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileReplicaCount = (int?) content.GetValueForProperty("PublishingProfileReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PublishingProfileExcludeFromLatest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublishingProfilePublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileEndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileStorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("PublishingProfileTargetExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileTargetExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[]) content.GetValueForProperty("PublishingProfileTargetExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileTargetExtendedLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocationTypeConverter.ConvertFrom)); + } + if (content.Contains("StorageProfileSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).StorageProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("StorageProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).StorageProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileOSDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).StorageProfileOSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage) content.GetValueForProperty("StorageProfileOSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).StorageProfileOSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDiskImageTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileDataDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).StorageProfileDataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[]) content.GetValueForProperty("StorageProfileDataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).StorageProfileDataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDataDiskImageTypeConverter.ConvertFrom)); + } + if (content.Contains("OSDiskImageHostCaching")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageHostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("OSDiskImageHostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageHostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); + } + if (content.Contains("ReplicationStatusAggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); + } + if (content.Contains("PropertiesStorageProfileSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PropertiesStorageProfileSourceId = (string) content.GetValueForProperty("PropertiesStorageProfileSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PropertiesStorageProfileSourceId, global::System.Convert.ToString); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("OSDiskImageSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("OSDiskImageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSDiskImageSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageSourceId = (string) content.GetValueForProperty("OSDiskImageSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageSourceId, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSourceUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageSourceUri = (string) content.GetValueForProperty("OSDiskImageSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageSourceUri, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryImageVersion(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("ReplicationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatusTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactPublishingProfileBaseTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionStorageProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("PublishingProfileReplicationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); + } + if (content.Contains("ReplicationStatusSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalReplicationStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("PublishingProfileTargetRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileTargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]) content.GetValueForProperty("PublishingProfileTargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileTargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegionTypeConverter.ConvertFrom)); + } + if (content.Contains("PublishingProfileReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileReplicaCount = (int?) content.GetValueForProperty("PublishingProfileReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PublishingProfileExcludeFromLatest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublishingProfilePublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileEndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileStorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("PublishingProfileTargetExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileTargetExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[]) content.GetValueForProperty("PublishingProfileTargetExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PublishingProfileTargetExtendedLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocationTypeConverter.ConvertFrom)); + } + if (content.Contains("StorageProfileSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).StorageProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("StorageProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).StorageProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileOSDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).StorageProfileOSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage) content.GetValueForProperty("StorageProfileOSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).StorageProfileOSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDiskImageTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileDataDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).StorageProfileDataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[]) content.GetValueForProperty("StorageProfileDataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).StorageProfileDataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDataDiskImageTypeConverter.ConvertFrom)); + } + if (content.Contains("OSDiskImageHostCaching")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageHostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("OSDiskImageHostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageHostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); + } + if (content.Contains("ReplicationStatusAggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); + } + if (content.Contains("PropertiesStorageProfileSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PropertiesStorageProfileSourceId = (string) content.GetValueForProperty("PropertiesStorageProfileSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).PropertiesStorageProfileSourceId, global::System.Convert.ToString); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("OSDiskImageSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("OSDiskImageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSDiskImageSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageSourceId = (string) content.GetValueForProperty("OSDiskImageSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageSourceId, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSourceUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageSourceUri = (string) content.GetValueForProperty("OSDiskImageSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal)this).OSDiskImageSourceUri, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Specifies information about the gallery image version that you want to create or update. + [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionTypeConverter))] + public partial interface IGalleryImageVersion + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersion.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersion.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.TypeConverter.cs index 32fc40663a24..376a97529440 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersion.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryImageVersionTypeConverter : global::System.Managemen { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersion.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.cs similarity index 77% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersion.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.cs index 5b469f19bf31..c6617dbdf7bb 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersion.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 /// Specifies information about the gallery image version that you want to create or update. /// public partial class GalleryImageVersion : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// @@ -29,50 +29,50 @@ public partial class GalleryImageVersion : [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Location = value ; } + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Type = value; } + /// Internal Acessors for OSDiskImageSizeInGb - int? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal.OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal.OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb = value; } /// Internal Acessors for OSDiskImageSource - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal.OSDiskImageSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSource = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal.OSDiskImageSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSource = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for PublishingProfile - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal.PublishingProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal.PublishingProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfile = value; } /// Internal Acessors for PublishingProfilePublishedDate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal.PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfilePublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfilePublishedDate = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal.PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfilePublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfilePublishedDate = value; } /// Internal Acessors for ReplicationStatus - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal.ReplicationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatus = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal.ReplicationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatus = value; } /// Internal Acessors for ReplicationStatusAggregatedState - Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal.ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusAggregatedState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusAggregatedState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal.ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusAggregatedState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusAggregatedState = value; } /// Internal Acessors for ReplicationStatusSummary - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal.ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusSummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusSummary = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal.ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusSummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusSummary = value; } /// Internal Acessors for StorageProfile - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal.StorageProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).StorageProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).StorageProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal.StorageProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).StorageProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).StorageProfile = value; } /// Internal Acessors for StorageProfileOSDiskImage - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal.StorageProfileOSDiskImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).StorageProfileOSDiskImage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).StorageProfileOSDiskImage = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal.StorageProfileOSDiskImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).StorageProfileOSDiskImage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).StorageProfileOSDiskImage = value; } /// Internal Acessors for StorageProfileSource - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionInternal.StorageProfileSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).StorageProfileSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).StorageProfileSource = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceInternal)__resource).Type = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal.StorageProfileSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).StorageProfileSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).StorageProfileSource = value; } /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] @@ -82,96 +82,102 @@ public partial class GalleryImageVersion : /// The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite' /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching? OSDiskImageHostCaching { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageHostCaching; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageHostCaching = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching? OSDiskImageHostCaching { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageHostCaching; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageHostCaching = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching)""); } /// This property indicates the size of the VHD to be created. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb; } + public int? OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb; } /// /// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string OSDiskImageSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSourceId = value ?? null; } + public string OSDiskImageSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSourceId = value ?? null; } /// /// The uri of the gallery artifact version source. Currently used to specify vhd/blob source. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string OSDiskImageSourceUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSourceUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSourceUri = value ?? null; } + public string OSDiskImageSourceUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSourceUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSourceUri = value ?? null; } /// /// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string PropertiesStorageProfileSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).Id = value ?? null; } + public string PropertiesStorageProfileSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).Id = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties _property; /// Describes the properties of a gallery image version. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionProperties()); set => this._property = value; } /// The provisioning state, which only appears in the response. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ProvisioningState; } /// /// The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property /// is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public global::System.DateTime? PublishingProfileEndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileEndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileEndOfLifeDate = value ?? default(global::System.DateTime); } + public global::System.DateTime? PublishingProfileEndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileEndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileEndOfLifeDate = value ?? default(global::System.DateTime); } /// /// If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public bool? PublishingProfileExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileExcludeFromLatest; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileExcludeFromLatest = value ?? default(bool); } + public bool? PublishingProfileExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileExcludeFromLatest; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileExcludeFromLatest = value ?? default(bool); } /// The timestamp for when the gallery image version is published. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public global::System.DateTime? PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfilePublishedDate; } + public global::System.DateTime? PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfilePublishedDate; } /// /// The number of replicas of the Image Version to be created per region. This property would take effect for a region when /// regionalReplicaCount is not specified. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? PublishingProfileReplicaCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileReplicaCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileReplicaCount = value ?? default(int); } + public int? PublishingProfileReplicaCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileReplicaCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileReplicaCount = value ?? default(int); } /// /// Optional parameter which specifies the mode to be used for replication. This property is not updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode? PublishingProfileReplicationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileReplicationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileReplicationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode? PublishingProfileReplicationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileReplicationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileReplicationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); } /// /// Specifies the storage account type to be used to store the image. This property is not updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileStorageAccountType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileStorageAccountType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileStorageAccountType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileStorageAccountType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); } + + /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileTargetExtendedLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileTargetExtendedLocation = value ?? null /* arrayOf */; } /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] PublishingProfileTargetRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileTargetRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileTargetRegion = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] PublishingProfileTargetRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileTargetRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileTargetRegion = value ?? null /* arrayOf */; } /// /// This is the aggregated replication status based on all the regional replication status flags. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusAggregatedState; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusAggregatedState; } /// This is a summary of replication status for each region. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusSummary; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusSummary; } /// A list of data disk images. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[] StorageProfileDataDiskImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).StorageProfileDataDiskImage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).StorageProfileDataDiskImage = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[] StorageProfileDataDiskImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).StorageProfileDataDiskImage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).StorageProfileDataDiskImage = value ?? null /* arrayOf */; } /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] @@ -185,7 +191,7 @@ public partial class GalleryImageVersion : /// The uri of the gallery artifact version source. Currently used to specify vhd/blob source. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).Uri = value ?? null; } + public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).Uri = value ?? null; } /// Creates an new instance. public GalleryImageVersion() @@ -197,7 +203,7 @@ public GalleryImageVersion() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { @@ -264,8 +270,8 @@ public partial interface IGalleryImageVersion : ReadOnly = true, Description = @"The provisioning state, which only appears in the response.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(string) })] - string ProvisioningState { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; } /// /// The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property /// is updatable. @@ -327,6 +333,16 @@ public partial interface IGalleryImageVersion : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType) })] Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get; set; } /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The target extended locations where the Image Version is going to be replicated to. This property is updatable.", + SerializedName = @"targetExtendedLocations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get; set; } + /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( @@ -334,8 +350,8 @@ public partial interface IGalleryImageVersion : ReadOnly = false, Description = @"The target regions where the Image Version is going to be replicated to. This property is updatable.", SerializedName = @"targetRegions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] PublishingProfileTargetRegion { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] PublishingProfileTargetRegion { get; set; } /// /// This is the aggregated replication status based on all the regional replication status flags. /// @@ -352,16 +368,16 @@ public partial interface IGalleryImageVersion : ReadOnly = true, Description = @"This is a summary of replication status for each region.", SerializedName = @"summary", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] ReplicationStatusSummary { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] ReplicationStatusSummary { get; } /// A list of data disk images. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, ReadOnly = false, Description = @"A list of data disk images.", SerializedName = @"dataDiskImages", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[] StorageProfileDataDiskImage { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[] StorageProfileDataDiskImage { get; set; } /// /// The uri of the gallery artifact version source. Currently used to specify vhd/blob source. /// @@ -385,7 +401,7 @@ internal partial interface IGalleryImageVersionInternal : /// This property indicates the size of the VHD to be created. int? OSDiskImageSizeInGb { get; set; } /// The gallery artifact version source. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource OSDiskImageSource { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource OSDiskImageSource { get; set; } /// /// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. /// @@ -399,11 +415,11 @@ internal partial interface IGalleryImageVersionInternal : /// string PropertiesStorageProfileSourceId { get; set; } /// Describes the properties of a gallery image version. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties Property { get; set; } /// The provisioning state, which only appears in the response. - string ProvisioningState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; set; } /// Describes the basic gallery artifact publishing profile. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase PublishingProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase PublishingProfile { get; set; } /// /// The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property /// is updatable. @@ -429,25 +445,29 @@ internal partial interface IGalleryImageVersionInternal : /// Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get; set; } /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get; set; } + /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] PublishingProfileTargetRegion { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] PublishingProfileTargetRegion { get; set; } /// This is the replication status of the gallery image version. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus ReplicationStatus { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus ReplicationStatus { get; set; } /// /// This is the aggregated replication status based on all the regional replication status flags. /// Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? ReplicationStatusAggregatedState { get; set; } /// This is a summary of replication status for each region. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] ReplicationStatusSummary { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] ReplicationStatusSummary { get; set; } /// This is the storage profile of a Gallery Image Version. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile StorageProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile StorageProfile { get; set; } /// A list of data disk images. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[] StorageProfileDataDiskImage { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[] StorageProfileDataDiskImage { get; set; } /// This is the disk image base class. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage StorageProfileOSDiskImage { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage StorageProfileOSDiskImage { get; set; } /// The gallery artifact version source. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource StorageProfileSource { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource StorageProfileSource { get; set; } /// /// The uri of the gallery artifact version source. Currently used to specify vhd/blob source. /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersion.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.json.cs similarity index 91% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersion.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.json.cs index 88a14aa38581..fad746b0c2c0 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersion.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -22,7 +22,7 @@ public partial class GalleryImageVersion partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -32,7 +32,8 @@ public partial class GalleryImageVersion /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -44,7 +45,8 @@ public partial class GalleryImageVersion /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -54,13 +56,13 @@ public partial class GalleryImageVersion partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryImageVersion(json) : null; } @@ -78,7 +80,7 @@ internal GalleryImageVersion(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime. return; } __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionList.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionList.PowerShell.cs similarity index 69% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionList.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionList.PowerShell.cs index 9194dad27846..03f2390c59bd 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionList.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class GalleryImageVersionList /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class GalleryImageVersionList /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class GalleryImageVersionList partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GalleryImageVersionList(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GalleryImageVersionList(content); } @@ -82,11 +84,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGal /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -99,13 +101,19 @@ internal GalleryImageVersionList(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionListInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -118,8 +126,14 @@ internal GalleryImageVersionList(global::System.Management.Automation.PSObject c return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionListInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionList.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionList.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionList.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionList.TypeConverter.cs index 13e1a73ddbf7..7f4051bfca34 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionList.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryImageVersionListTypeConverter : global::System.Manag { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionList.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionList.cs similarity index 91% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionList.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionList.cs index 81e6ef19cf55..1d6dc3ab5abf 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionList.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionList.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// The List Gallery Image version operation response. public partial class GalleryImageVersionList : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionList, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionListInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionList, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionListInternal { /// Backing field for property. @@ -24,11 +24,11 @@ public partial class GalleryImageVersionList : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion[] _value; /// A list of gallery image versions. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public GalleryImageVersionList() @@ -57,8 +57,8 @@ public partial interface IGalleryImageVersionList : ReadOnly = false, Description = @"A list of gallery image versions.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion[] Value { get; set; } } /// The List Gallery Image version operation response. @@ -71,7 +71,7 @@ internal partial interface IGalleryImageVersionListInternal /// string NextLink { get; set; } /// A list of gallery image versions. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion[] Value { get; set; } } } \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionList.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionList.json.cs similarity index 90% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionList.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionList.json.cs index c97f2e610703..f08570298035 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionList.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryImageVersionList partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryImageVersionList /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryImageVersionList /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryImageVersionList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionList FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionList FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryImageVersionList(json) : null; } @@ -75,7 +77,7 @@ internal GalleryImageVersionList(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runt { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersion) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersion.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersion.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionProperties.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionProperties.PowerShell.cs new file mode 100644 index 000000000000..e7ef1d6a4f30 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionProperties.PowerShell.cs @@ -0,0 +1,330 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Describes the properties of a gallery image version. + [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionPropertiesTypeConverter))] + public partial class GalleryImageVersionProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryImageVersionProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryImageVersionProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryImageVersionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PublishingProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactPublishingProfileBaseTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionStorageProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ReplicationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatusTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("PublishingProfileReplicationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); + } + if (content.Contains("ReplicationStatusSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalReplicationStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("PublishingProfileTargetRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileTargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]) content.GetValueForProperty("PublishingProfileTargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileTargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegionTypeConverter.ConvertFrom)); + } + if (content.Contains("PublishingProfileReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileReplicaCount = (int?) content.GetValueForProperty("PublishingProfileReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PublishingProfileExcludeFromLatest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublishingProfilePublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileEndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileStorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("PublishingProfileTargetExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileTargetExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[]) content.GetValueForProperty("PublishingProfileTargetExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileTargetExtendedLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocationTypeConverter.ConvertFrom)); + } + if (content.Contains("StorageProfileSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).StorageProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("StorageProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).StorageProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileOSDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).StorageProfileOSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage) content.GetValueForProperty("StorageProfileOSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).StorageProfileOSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDiskImageTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileDataDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).StorageProfileDataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[]) content.GetValueForProperty("StorageProfileDataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).StorageProfileDataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDataDiskImageTypeConverter.ConvertFrom)); + } + if (content.Contains("OSDiskImageHostCaching")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageHostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("OSDiskImageHostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageHostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); + } + if (content.Contains("ReplicationStatusAggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("OSDiskImageSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("OSDiskImageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSDiskImageSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSourceId = (string) content.GetValueForProperty("OSDiskImageSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSourceId, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSourceUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSourceUri = (string) content.GetValueForProperty("OSDiskImageSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSourceUri, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryImageVersionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PublishingProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactPublishingProfileBaseTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionStorageProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ReplicationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatusTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("PublishingProfileReplicationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); + } + if (content.Contains("ReplicationStatusSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalReplicationStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("PublishingProfileTargetRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileTargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]) content.GetValueForProperty("PublishingProfileTargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileTargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegionTypeConverter.ConvertFrom)); + } + if (content.Contains("PublishingProfileReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileReplicaCount = (int?) content.GetValueForProperty("PublishingProfileReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PublishingProfileExcludeFromLatest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublishingProfilePublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileEndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileStorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("PublishingProfileTargetExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileTargetExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[]) content.GetValueForProperty("PublishingProfileTargetExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).PublishingProfileTargetExtendedLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocationTypeConverter.ConvertFrom)); + } + if (content.Contains("StorageProfileSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).StorageProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("StorageProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).StorageProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileOSDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).StorageProfileOSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage) content.GetValueForProperty("StorageProfileOSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).StorageProfileOSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDiskImageTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileDataDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).StorageProfileDataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[]) content.GetValueForProperty("StorageProfileDataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).StorageProfileDataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDataDiskImageTypeConverter.ConvertFrom)); + } + if (content.Contains("OSDiskImageHostCaching")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageHostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("OSDiskImageHostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageHostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); + } + if (content.Contains("ReplicationStatusAggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("OSDiskImageSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("OSDiskImageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSDiskImageSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSourceId = (string) content.GetValueForProperty("OSDiskImageSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSourceId, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSourceUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSourceUri = (string) content.GetValueForProperty("OSDiskImageSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)this).OSDiskImageSourceUri, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Describes the properties of a gallery image version. + [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionPropertiesTypeConverter))] + public partial interface IGalleryImageVersionProperties + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionProperties.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionProperties.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionProperties.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionProperties.TypeConverter.cs index 9ddccf7cb04a..56ebaa3a94fa 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionProperties.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryImageVersionPropertiesTypeConverter : global::System { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionProperties.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionProperties.cs similarity index 76% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionProperties.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionProperties.cs index 825bc48f24a2..0afd8c85291d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionProperties.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionProperties.cs @@ -3,166 +3,172 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// Describes the properties of a gallery image version. public partial class GalleryImageVersionProperties : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal { /// /// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).Id = value ?? null; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).Id = value ?? null; } /// Internal Acessors for OSDiskImageSizeInGb - int? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal.OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageSizeInGb = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal.OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageSizeInGb = value; } /// Internal Acessors for OSDiskImageSource - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal.OSDiskImageSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageSource = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal.OSDiskImageSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageSource = value; } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for PublishingProfile - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal.PublishingProfile { get => (this._publishingProfile = this._publishingProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactPublishingProfileBase()); set { {_publishingProfile = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal.PublishingProfile { get => (this._publishingProfile = this._publishingProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactPublishingProfileBase()); set { {_publishingProfile = value;} } } /// Internal Acessors for PublishingProfilePublishedDate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal.PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).PublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).PublishedDate = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal.PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).PublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).PublishedDate = value; } /// Internal Acessors for ReplicationStatus - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal.ReplicationStatus { get => (this._replicationStatus = this._replicationStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatus()); set { {_replicationStatus = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal.ReplicationStatus { get => (this._replicationStatus = this._replicationStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatus()); set { {_replicationStatus = value;} } } /// Internal Acessors for ReplicationStatusAggregatedState - Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal.ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)ReplicationStatus).AggregatedState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)ReplicationStatus).AggregatedState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal.ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)ReplicationStatus).AggregatedState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)ReplicationStatus).AggregatedState = value; } /// Internal Acessors for ReplicationStatusSummary - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal.ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)ReplicationStatus).Summary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)ReplicationStatus).Summary = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal.ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)ReplicationStatus).Summary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)ReplicationStatus).Summary = value; } /// Internal Acessors for StorageProfile - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal.StorageProfile { get => (this._storageProfile = this._storageProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionStorageProfile()); set { {_storageProfile = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal.StorageProfile { get => (this._storageProfile = this._storageProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionStorageProfile()); set { {_storageProfile = value;} } } /// Internal Acessors for StorageProfileOSDiskImage - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal.StorageProfileOSDiskImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImage = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal.StorageProfileOSDiskImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImage = value; } /// Internal Acessors for StorageProfileSource - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal.StorageProfileSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).Source; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).Source = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal.StorageProfileSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).Source; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).Source = value; } /// /// The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite' /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching? OSDiskImageHostCaching { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageHostCaching; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageHostCaching = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching? OSDiskImageHostCaching { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageHostCaching; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageHostCaching = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching)""); } /// This property indicates the size of the VHD to be created. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageSizeInGb; } + public int? OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageSizeInGb; } /// /// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string OSDiskImageSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageSourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageSourceId = value ?? null; } + public string OSDiskImageSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageSourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageSourceId = value ?? null; } /// /// The uri of the gallery artifact version source. Currently used to specify vhd/blob source. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string OSDiskImageSourceUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageSourceUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageSourceUri = value ?? null; } + public string OSDiskImageSourceUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageSourceUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).OSDiskImageSourceUri = value ?? null; } /// Backing field for property. - private string _provisioningState; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? _provisioningState; /// The provisioning state, which only appears in the response. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - public string ProvisioningState { get => this._provisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get => this._provisioningState; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase _publishingProfile; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase _publishingProfile; /// Describes the basic gallery artifact publishing profile. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase PublishingProfile { get => (this._publishingProfile = this._publishingProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactPublishingProfileBase()); set => this._publishingProfile = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase PublishingProfile { get => (this._publishingProfile = this._publishingProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactPublishingProfileBase()); set => this._publishingProfile = value; } /// /// The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property /// is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public global::System.DateTime? PublishingProfileEndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).EndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).EndOfLifeDate = value ?? default(global::System.DateTime); } + public global::System.DateTime? PublishingProfileEndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).EndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).EndOfLifeDate = value ?? default(global::System.DateTime); } /// /// If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public bool? PublishingProfileExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ExcludeFromLatest; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ExcludeFromLatest = value ?? default(bool); } + public bool? PublishingProfileExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ExcludeFromLatest; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ExcludeFromLatest = value ?? default(bool); } /// The timestamp for when the gallery image version is published. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public global::System.DateTime? PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).PublishedDate; } + public global::System.DateTime? PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).PublishedDate; } /// /// The number of replicas of the Image Version to be created per region. This property would take effect for a region when /// regionalReplicaCount is not specified. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? PublishingProfileReplicaCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ReplicaCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ReplicaCount = value ?? default(int); } + public int? PublishingProfileReplicaCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ReplicaCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ReplicaCount = value ?? default(int); } /// /// Optional parameter which specifies the mode to be used for replication. This property is not updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode? PublishingProfileReplicationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ReplicationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ReplicationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode? PublishingProfileReplicationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ReplicationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).ReplicationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); } /// /// Specifies the storage account type to be used to store the image. This property is not updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).StorageAccountType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).StorageAccountType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).StorageAccountType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).StorageAccountType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); } + + /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).TargetExtendedLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).TargetExtendedLocation = value ?? null /* arrayOf */; } /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] PublishingProfileTargetRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).TargetRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).TargetRegion = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] PublishingProfileTargetRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).TargetRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)PublishingProfile).TargetRegion = value ?? null /* arrayOf */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus _replicationStatus; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus _replicationStatus; /// This is the replication status of the gallery image version. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus ReplicationStatus { get => (this._replicationStatus = this._replicationStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatus()); } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus ReplicationStatus { get => (this._replicationStatus = this._replicationStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatus()); } /// /// This is the aggregated replication status based on all the regional replication status flags. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)ReplicationStatus).AggregatedState; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)ReplicationStatus).AggregatedState; } /// This is a summary of replication status for each region. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)ReplicationStatus).Summary; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)ReplicationStatus).Summary; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile _storageProfile; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile _storageProfile; /// This is the storage profile of a Gallery Image Version. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile StorageProfile { get => (this._storageProfile = this._storageProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionStorageProfile()); set => this._storageProfile = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile StorageProfile { get => (this._storageProfile = this._storageProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionStorageProfile()); set => this._storageProfile = value; } /// A list of data disk images. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[] StorageProfileDataDiskImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).DataDiskImage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).DataDiskImage = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[] StorageProfileDataDiskImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).DataDiskImage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).DataDiskImage = value ?? null /* arrayOf */; } /// /// The uri of the gallery artifact version source. Currently used to specify vhd/blob source. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal)StorageProfile).Uri = value ?? null; } + public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)StorageProfile).Uri = value ?? null; } /// Creates an new instance. public GalleryImageVersionProperties() @@ -228,8 +234,8 @@ public partial interface IGalleryImageVersionProperties : ReadOnly = true, Description = @"The provisioning state, which only appears in the response.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(string) })] - string ProvisioningState { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; } /// /// The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property /// is updatable. @@ -291,6 +297,16 @@ public partial interface IGalleryImageVersionProperties : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType) })] Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get; set; } /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The target extended locations where the Image Version is going to be replicated to. This property is updatable.", + SerializedName = @"targetExtendedLocations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get; set; } + /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( @@ -298,8 +314,8 @@ public partial interface IGalleryImageVersionProperties : ReadOnly = false, Description = @"The target regions where the Image Version is going to be replicated to. This property is updatable.", SerializedName = @"targetRegions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] PublishingProfileTargetRegion { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] PublishingProfileTargetRegion { get; set; } /// /// This is the aggregated replication status based on all the regional replication status flags. /// @@ -316,16 +332,16 @@ public partial interface IGalleryImageVersionProperties : ReadOnly = true, Description = @"This is a summary of replication status for each region.", SerializedName = @"summary", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] ReplicationStatusSummary { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] ReplicationStatusSummary { get; } /// A list of data disk images. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, ReadOnly = false, Description = @"A list of data disk images.", SerializedName = @"dataDiskImages", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[] StorageProfileDataDiskImage { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[] StorageProfileDataDiskImage { get; set; } /// /// The uri of the gallery artifact version source. Currently used to specify vhd/blob source. /// @@ -353,7 +369,7 @@ internal partial interface IGalleryImageVersionPropertiesInternal /// This property indicates the size of the VHD to be created. int? OSDiskImageSizeInGb { get; set; } /// The gallery artifact version source. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource OSDiskImageSource { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource OSDiskImageSource { get; set; } /// /// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. /// @@ -363,9 +379,9 @@ internal partial interface IGalleryImageVersionPropertiesInternal /// string OSDiskImageSourceUri { get; set; } /// The provisioning state, which only appears in the response. - string ProvisioningState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; set; } /// Describes the basic gallery artifact publishing profile. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase PublishingProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase PublishingProfile { get; set; } /// /// The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property /// is updatable. @@ -391,25 +407,29 @@ internal partial interface IGalleryImageVersionPropertiesInternal /// Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get; set; } /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get; set; } + /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] PublishingProfileTargetRegion { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] PublishingProfileTargetRegion { get; set; } /// This is the replication status of the gallery image version. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus ReplicationStatus { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus ReplicationStatus { get; set; } /// /// This is the aggregated replication status based on all the regional replication status flags. /// Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? ReplicationStatusAggregatedState { get; set; } /// This is a summary of replication status for each region. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] ReplicationStatusSummary { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] ReplicationStatusSummary { get; set; } /// This is the storage profile of a Gallery Image Version. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile StorageProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile StorageProfile { get; set; } /// A list of data disk images. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[] StorageProfileDataDiskImage { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[] StorageProfileDataDiskImage { get; set; } /// This is the disk image base class. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage StorageProfileOSDiskImage { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage StorageProfileOSDiskImage { get; set; } /// The gallery artifact version source. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource StorageProfileSource { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource StorageProfileSource { get; set; } /// /// The uri of the gallery artifact version source. Currently used to specify vhd/blob source. /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionProperties.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionProperties.json.cs similarity index 91% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionProperties.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionProperties.json.cs index 50a1ddbcdfe0..fb8b8829dd29 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionProperties.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryImageVersionProperties partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryImageVersionProperties /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryImageVersionProperties /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryImageVersionProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryImageVersionProperties(json) : null; } @@ -75,9 +77,9 @@ internal GalleryImageVersionProperties(Microsoft.Azure.PowerShell.Cmdlets.Comput { return; } - {_publishingProfile = If( json?.PropertyT("publishingProfile"), out var __jsonPublishingProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactPublishingProfileBase.FromJson(__jsonPublishingProfile) : PublishingProfile;} - {_storageProfile = If( json?.PropertyT("storageProfile"), out var __jsonStorageProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionStorageProfile.FromJson(__jsonStorageProfile) : StorageProfile;} - {_replicationStatus = If( json?.PropertyT("replicationStatus"), out var __jsonReplicationStatus) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ReplicationStatus.FromJson(__jsonReplicationStatus) : ReplicationStatus;} + {_publishingProfile = If( json?.PropertyT("publishingProfile"), out var __jsonPublishingProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactPublishingProfileBase.FromJson(__jsonPublishingProfile) : PublishingProfile;} + {_storageProfile = If( json?.PropertyT("storageProfile"), out var __jsonStorageProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionStorageProfile.FromJson(__jsonStorageProfile) : StorageProfile;} + {_replicationStatus = If( json?.PropertyT("replicationStatus"), out var __jsonReplicationStatus) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatus.FromJson(__jsonReplicationStatus) : ReplicationStatus;} {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionPublishingProfile.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionPublishingProfile.PowerShell.cs new file mode 100644 index 000000000000..ddcb3e57049c --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionPublishingProfile.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// The publishing profile of a gallery image Version. + [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionPublishingProfileTypeConverter))] + public partial class GalleryImageVersionPublishingProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPublishingProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryImageVersionPublishingProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPublishingProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryImageVersionPublishingProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPublishingProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryImageVersionPublishingProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TargetRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegionTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ExcludeFromLatest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("StorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("ReplicationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("ReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); + } + if (content.Contains("TargetExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[]) content.GetValueForProperty("TargetExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetExtendedLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocationTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryImageVersionPublishingProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TargetRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegionTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount = (int?) content.GetValueForProperty("ReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ExcludeFromLatest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("EndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).EndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("StorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).StorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("ReplicationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("ReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).ReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); + } + if (content.Contains("TargetExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[]) content.GetValueForProperty("TargetExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)this).TargetExtendedLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocationTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The publishing profile of a gallery image Version. + [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionPublishingProfileTypeConverter))] + public partial interface IGalleryImageVersionPublishingProfile + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionPublishingProfile.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionPublishingProfile.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionPublishingProfile.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionPublishingProfile.TypeConverter.cs index 77ab718df8c9..3e15c49bdecc 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionPublishingProfile.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionPublishingProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -15,20 +15,20 @@ public partial class GalleryImageVersionPublishingProfileTypeConverter : global: { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -77,19 +77,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -101,21 +102,21 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPublishingProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPublishingProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPublishingProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPublishingProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionPublishingProfile.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionPublishingProfile.cs similarity index 74% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionPublishingProfile.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionPublishingProfile.cs index 75c338cd659b..c474b57b76a9 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionPublishingProfile.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionPublishingProfile.cs @@ -3,66 +3,72 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// The publishing profile of a gallery image Version. public partial class GalleryImageVersionPublishingProfile : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPublishingProfile, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPublishingProfileInternal, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPublishingProfile, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPublishingProfileInternal, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase __galleryArtifactPublishingProfileBase = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactPublishingProfileBase(); + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase __galleryArtifactPublishingProfileBase = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactPublishingProfileBase(); /// /// The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property /// is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public global::System.DateTime? EndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).EndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).EndOfLifeDate = value ?? default(global::System.DateTime); } + public global::System.DateTime? EndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).EndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).EndOfLifeDate = value ?? default(global::System.DateTime); } /// /// If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public bool? ExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ExcludeFromLatest; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ExcludeFromLatest = value ?? default(bool); } + public bool? ExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ExcludeFromLatest; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ExcludeFromLatest = value ?? default(bool); } /// Internal Acessors for PublishedDate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal.PublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).PublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).PublishedDate = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal.PublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).PublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).PublishedDate = value; } /// The timestamp for when the gallery image version is published. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public global::System.DateTime? PublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).PublishedDate; } + public global::System.DateTime? PublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).PublishedDate; } /// /// The number of replicas of the Image Version to be created per region. This property would take effect for a region when /// regionalReplicaCount is not specified. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public int? ReplicaCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ReplicaCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ReplicaCount = value ?? default(int); } + public int? ReplicaCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ReplicaCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ReplicaCount = value ?? default(int); } /// /// Optional parameter which specifies the mode to be used for replication. This property is not updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode? ReplicationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ReplicationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ReplicationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode? ReplicationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ReplicationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).ReplicationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); } /// /// Specifies the storage account type to be used to store the image. This property is not updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? StorageAccountType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).StorageAccountType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).StorageAccountType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? StorageAccountType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).StorageAccountType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).StorageAccountType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); } + + /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] TargetExtendedLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).TargetExtendedLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).TargetExtendedLocation = value ?? null /* arrayOf */; } /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] TargetRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).TargetRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).TargetRegion = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] TargetRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).TargetRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal)__galleryArtifactPublishingProfileBase).TargetRegion = value ?? null /* arrayOf */; } /// Creates an new instance. public GalleryImageVersionPublishingProfile() @@ -74,7 +80,7 @@ public GalleryImageVersionPublishingProfile() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { @@ -85,13 +91,13 @@ public GalleryImageVersionPublishingProfile() /// The publishing profile of a gallery image Version. public partial interface IGalleryImageVersionPublishingProfile : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase { } /// The publishing profile of a gallery image Version. internal partial interface IGalleryImageVersionPublishingProfileInternal : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBaseInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBaseInternal { } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionPublishingProfile.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionPublishingProfile.json.cs similarity index 90% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionPublishingProfile.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionPublishingProfile.json.cs index e506abe8ee15..905a5e76798b 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionPublishingProfile.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionPublishingProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryImageVersionPublishingProfile partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryImageVersionPublishingProfile /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryImageVersionPublishingProfile /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryImageVersionPublishingProfile partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPublishingProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPublishingProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPublishingProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPublishingProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPublishingProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPublishingProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryImageVersionPublishingProfile(json) : null; } @@ -75,7 +77,7 @@ internal GalleryImageVersionPublishingProfile(Microsoft.Azure.PowerShell.Cmdlets { return; } - __galleryArtifactPublishingProfileBase = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactPublishingProfileBase(json); + __galleryArtifactPublishingProfileBase = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactPublishingProfileBase(json); AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionStorageProfile.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionStorageProfile.PowerShell.cs new file mode 100644 index 000000000000..87b347489669 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionStorageProfile.PowerShell.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// This is the storage profile of a Gallery Image Version. + [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionStorageProfileTypeConverter))] + public partial class GalleryImageVersionStorageProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryImageVersionStorageProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryImageVersionStorageProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryImageVersionStorageProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("OSDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage) content.GetValueForProperty("OSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDiskImageTypeConverter.ConvertFrom); + } + if (content.Contains("DataDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).DataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[]) content.GetValueForProperty("DataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).DataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDataDiskImageTypeConverter.ConvertFrom)); + } + if (content.Contains("OSDiskImageHostCaching")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageHostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("OSDiskImageHostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageHostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("OSDiskImageSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("OSDiskImageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSDiskImageSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSourceId = (string) content.GetValueForProperty("OSDiskImageSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSourceId, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSourceUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSourceUri = (string) content.GetValueForProperty("OSDiskImageSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSourceUri, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryImageVersionStorageProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("OSDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage) content.GetValueForProperty("OSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDiskImageTypeConverter.ConvertFrom); + } + if (content.Contains("DataDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).DataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[]) content.GetValueForProperty("DataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).DataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDataDiskImageTypeConverter.ConvertFrom)); + } + if (content.Contains("OSDiskImageHostCaching")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageHostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("OSDiskImageHostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageHostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("OSDiskImageSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("OSDiskImageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSDiskImageSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSourceId = (string) content.GetValueForProperty("OSDiskImageSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSourceId, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSourceUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSourceUri = (string) content.GetValueForProperty("OSDiskImageSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal)this).OSDiskImageSourceUri, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// This is the storage profile of a Gallery Image Version. + [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionStorageProfileTypeConverter))] + public partial interface IGalleryImageVersionStorageProfile + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionStorageProfile.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionStorageProfile.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionStorageProfile.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionStorageProfile.TypeConverter.cs index 4d03b4622cda..a91de330bbf0 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionStorageProfile.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionStorageProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryImageVersionStorageProfileTypeConverter : global::Sy { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,21 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionStorageProfile.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionStorageProfile.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionStorageProfile.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionStorageProfile.cs index 838a5e219b79..bfd01b0f1dc6 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionStorageProfile.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionStorageProfile.cs @@ -3,82 +3,82 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// This is the storage profile of a Gallery Image Version. public partial class GalleryImageVersionStorageProfile : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[] _dataDiskImage; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[] _dataDiskImage; /// A list of data disk images. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[] DataDiskImage { get => this._dataDiskImage; set => this._dataDiskImage = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[] DataDiskImage { get => this._dataDiskImage; set => this._dataDiskImage = value; } /// /// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSourceInternal)Source).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSourceInternal)Source).Id = value ?? null; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSourceInternal)Source).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSourceInternal)Source).Id = value ?? null; } /// Internal Acessors for OSDiskImage - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal.OSDiskImage { get => (this._oSDiskImage = this._oSDiskImage ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDiskImage()); set { {_oSDiskImage = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal.OSDiskImage { get => (this._oSDiskImage = this._oSDiskImage ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDiskImage()); set { {_oSDiskImage = value;} } } /// Internal Acessors for OSDiskImageSizeInGb - int? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal.OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)OSDiskImage).SizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)OSDiskImage).SizeInGb = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal.OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)OSDiskImage).SizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)OSDiskImage).SizeInGb = value; } /// Internal Acessors for OSDiskImageSource - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal.OSDiskImageSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)OSDiskImage).Source; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)OSDiskImage).Source = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal.OSDiskImageSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)OSDiskImage).Source; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)OSDiskImage).Source = value; } /// Internal Acessors for Source - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfileInternal.Source { get => (this._source = this._source ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSource()); set { {_source = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfileInternal.Source { get => (this._source = this._source ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSource()); set { {_source = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage _oSDiskImage; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage _oSDiskImage; /// This is the disk image base class. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage OSDiskImage { get => (this._oSDiskImage = this._oSDiskImage ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDiskImage()); set => this._oSDiskImage = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage OSDiskImage { get => (this._oSDiskImage = this._oSDiskImage ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDiskImage()); set => this._oSDiskImage = value; } /// /// The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite' /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching? OSDiskImageHostCaching { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)OSDiskImage).HostCaching; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)OSDiskImage).HostCaching = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching? OSDiskImageHostCaching { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)OSDiskImage).HostCaching; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)OSDiskImage).HostCaching = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching)""); } /// This property indicates the size of the VHD to be created. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)OSDiskImage).SizeInGb; } + public int? OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)OSDiskImage).SizeInGb; } /// /// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string OSDiskImageSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)OSDiskImage).SourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)OSDiskImage).SourceId = value ?? null; } + public string OSDiskImageSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)OSDiskImage).SourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)OSDiskImage).SourceId = value ?? null; } /// /// The uri of the gallery artifact version source. Currently used to specify vhd/blob source. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string OSDiskImageSourceUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)OSDiskImage).SourceUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)OSDiskImage).SourceUri = value ?? null; } + public string OSDiskImageSourceUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)OSDiskImage).SourceUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)OSDiskImage).SourceUri = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource _source; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource _source; /// The gallery artifact version source. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource Source { get => (this._source = this._source ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSource()); set => this._source = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource Source { get => (this._source = this._source ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSource()); set => this._source = value; } /// /// The uri of the gallery artifact version source. Currently used to specify vhd/blob source. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSourceInternal)Source).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSourceInternal)Source).Uri = value ?? null; } + public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSourceInternal)Source).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSourceInternal)Source).Uri = value ?? null; } /// Creates an new instance. public GalleryImageVersionStorageProfile() @@ -96,8 +96,8 @@ public partial interface IGalleryImageVersionStorageProfile : ReadOnly = false, Description = @"A list of data disk images.", SerializedName = @"dataDiskImages", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[] DataDiskImage { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[] DataDiskImage { get; set; } /// /// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. /// @@ -163,13 +163,13 @@ internal partial interface IGalleryImageVersionStorageProfileInternal { /// A list of data disk images. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[] DataDiskImage { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[] DataDiskImage { get; set; } /// /// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. /// string Id { get; set; } /// This is the disk image base class. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage OSDiskImage { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage OSDiskImage { get; set; } /// /// The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite' /// @@ -177,7 +177,7 @@ internal partial interface IGalleryImageVersionStorageProfileInternal /// This property indicates the size of the VHD to be created. int? OSDiskImageSizeInGb { get; set; } /// The gallery artifact version source. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource OSDiskImageSource { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource OSDiskImageSource { get; set; } /// /// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. /// @@ -187,7 +187,7 @@ internal partial interface IGalleryImageVersionStorageProfileInternal /// string OSDiskImageSourceUri { get; set; } /// The gallery artifact version source. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource Source { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource Source { get; set; } /// /// The uri of the gallery artifact version source. Currently used to specify vhd/blob source. /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionStorageProfile.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionStorageProfile.json.cs similarity index 89% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionStorageProfile.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionStorageProfile.json.cs index f202d8b89833..2051097467bb 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionStorageProfile.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionStorageProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryImageVersionStorageProfile partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryImageVersionStorageProfile /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryImageVersionStorageProfile /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryImageVersionStorageProfile partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryImageVersionStorageProfile(json) : null; } @@ -75,9 +77,9 @@ internal GalleryImageVersionStorageProfile(Microsoft.Azure.PowerShell.Cmdlets.Co { return; } - {_source = If( json?.PropertyT("source"), out var __jsonSource) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSource.FromJson(__jsonSource) : Source;} - {_oSDiskImage = If( json?.PropertyT("osDiskImage"), out var __jsonOSDiskImage) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDiskImage.FromJson(__jsonOSDiskImage) : OSDiskImage;} - {_dataDiskImage = If( json?.PropertyT("dataDiskImages"), out var __jsonDataDiskImages) ? If( __jsonDataDiskImages as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDataDiskImage.FromJson(__u) )) ))() : null : DataDiskImage;} + {_source = If( json?.PropertyT("source"), out var __jsonSource) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSource.FromJson(__jsonSource) : Source;} + {_oSDiskImage = If( json?.PropertyT("osDiskImage"), out var __jsonOSDiskImage) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDiskImage.FromJson(__jsonOSDiskImage) : OSDiskImage;} + {_dataDiskImage = If( json?.PropertyT("dataDiskImages"), out var __jsonDataDiskImages) ? If( __jsonDataDiskImages as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDataDiskImage.FromJson(__u) )) ))() : null : DataDiskImage;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionUpdate.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionUpdate.PowerShell.cs new file mode 100644 index 000000000000..afc7b90d720c --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionUpdate.PowerShell.cs @@ -0,0 +1,368 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Specifies information about the gallery image version that you want to update. + [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionUpdateTypeConverter))] + public partial class GalleryImageVersionUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryImageVersionUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryImageVersionUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryImageVersionUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); + } + if (content.Contains("ReplicationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatusTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactPublishingProfileBaseTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionStorageProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("PublishingProfileReplicationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); + } + if (content.Contains("ReplicationStatusSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalReplicationStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("PublishingProfileTargetRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileTargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]) content.GetValueForProperty("PublishingProfileTargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileTargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegionTypeConverter.ConvertFrom)); + } + if (content.Contains("PublishingProfileReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileReplicaCount = (int?) content.GetValueForProperty("PublishingProfileReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PublishingProfileExcludeFromLatest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublishingProfilePublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileEndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileStorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("PublishingProfileTargetExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileTargetExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[]) content.GetValueForProperty("PublishingProfileTargetExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileTargetExtendedLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocationTypeConverter.ConvertFrom)); + } + if (content.Contains("StorageProfileSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).StorageProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("StorageProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).StorageProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileOSDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).StorageProfileOSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage) content.GetValueForProperty("StorageProfileOSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).StorageProfileOSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDiskImageTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileDataDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).StorageProfileDataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[]) content.GetValueForProperty("StorageProfileDataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).StorageProfileDataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDataDiskImageTypeConverter.ConvertFrom)); + } + if (content.Contains("OSDiskImageHostCaching")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageHostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("OSDiskImageHostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageHostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); + } + if (content.Contains("ReplicationStatusAggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); + } + if (content.Contains("PropertiesStorageProfileSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PropertiesStorageProfileSourceId = (string) content.GetValueForProperty("PropertiesStorageProfileSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PropertiesStorageProfileSourceId, global::System.Convert.ToString); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("OSDiskImageSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("OSDiskImageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSDiskImageSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageSourceId = (string) content.GetValueForProperty("OSDiskImageSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageSourceId, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSourceUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageSourceUri = (string) content.GetValueForProperty("OSDiskImageSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageSourceUri, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryImageVersionUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); + } + if (content.Contains("ReplicationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).ReplicationStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus) content.GetValueForProperty("ReplicationStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).ReplicationStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ReplicationStatusTypeConverter.ConvertFrom); + } + if (content.Contains("PublishingProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase) content.GetValueForProperty("PublishingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactPublishingProfileBaseTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionStorageProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("PublishingProfileReplicationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileReplicationMode = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode?) content.GetValueForProperty("PublishingProfileReplicationMode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileReplicationMode, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode.CreateFrom); + } + if (content.Contains("ReplicationStatusSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).ReplicationStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[]) content.GetValueForProperty("ReplicationStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).ReplicationStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalReplicationStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("PublishingProfileTargetRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileTargetRegion = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]) content.GetValueForProperty("PublishingProfileTargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileTargetRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.TargetRegionTypeConverter.ConvertFrom)); + } + if (content.Contains("PublishingProfileReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileReplicaCount = (int?) content.GetValueForProperty("PublishingProfileReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PublishingProfileExcludeFromLatest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileExcludeFromLatest = (bool?) content.GetValueForProperty("PublishingProfileExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublishingProfilePublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfilePublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfilePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfilePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileEndOfLifeDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileEndOfLifeDate = (global::System.DateTime?) content.GetValueForProperty("PublishingProfileEndOfLifeDate",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileEndOfLifeDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PublishingProfileStorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileStorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("PublishingProfileStorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileStorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("PublishingProfileTargetExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileTargetExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[]) content.GetValueForProperty("PublishingProfileTargetExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PublishingProfileTargetExtendedLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTargetExtendedLocationTypeConverter.ConvertFrom)); + } + if (content.Contains("StorageProfileSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).StorageProfileSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("StorageProfileSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).StorageProfileSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileOSDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).StorageProfileOSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage) content.GetValueForProperty("StorageProfileOSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).StorageProfileOSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDiskImageTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileDataDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).StorageProfileDataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[]) content.GetValueForProperty("StorageProfileDataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).StorageProfileDataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDataDiskImageTypeConverter.ConvertFrom)); + } + if (content.Contains("OSDiskImageHostCaching")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageHostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("OSDiskImageHostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageHostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); + } + if (content.Contains("ReplicationStatusAggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).ReplicationStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("ReplicationStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).ReplicationStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); + } + if (content.Contains("PropertiesStorageProfileSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PropertiesStorageProfileSourceId = (string) content.GetValueForProperty("PropertiesStorageProfileSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).PropertiesStorageProfileSourceId, global::System.Convert.ToString); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageSource = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("OSDiskImageSource",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageSource, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("OSDiskImageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSDiskImageSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageSourceId = (string) content.GetValueForProperty("OSDiskImageSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageSourceId, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSourceUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageSourceUri = (string) content.GetValueForProperty("OSDiskImageSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal)this).OSDiskImageSourceUri, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Specifies information about the gallery image version that you want to update. + [System.ComponentModel.TypeConverter(typeof(GalleryImageVersionUpdateTypeConverter))] + public partial interface IGalleryImageVersionUpdate + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionUpdate.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionUpdate.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionUpdate.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionUpdate.TypeConverter.cs index a12d62b5a29c..75f9494cdcf5 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionUpdate.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryImageVersionUpdateTypeConverter : global::System.Man { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionUpdate.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionUpdate.cs similarity index 74% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionUpdate.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionUpdate.cs index 5b9e6d556a05..1cae7784efc3 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionUpdate.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionUpdate.cs @@ -3,183 +3,189 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// Specifies information about the gallery image version that you want to update. public partial class GalleryImageVersionUpdate : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdate, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinition __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinition(); + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinition __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinition(); /// Resource Id [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; } /// Internal Acessors for OSDiskImageSizeInGb - int? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal.OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal.OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb = value; } /// Internal Acessors for OSDiskImageSource - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal.OSDiskImageSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSource = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal.OSDiskImageSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSource = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for PublishingProfile - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal.PublishingProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal.PublishingProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfile = value; } /// Internal Acessors for PublishingProfilePublishedDate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal.PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfilePublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfilePublishedDate = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal.PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfilePublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfilePublishedDate = value; } /// Internal Acessors for ReplicationStatus - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal.ReplicationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatus = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal.ReplicationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatus = value; } /// Internal Acessors for ReplicationStatusAggregatedState - Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal.ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusAggregatedState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusAggregatedState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal.ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusAggregatedState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusAggregatedState = value; } /// Internal Acessors for ReplicationStatusSummary - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal.ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusSummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusSummary = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal.ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusSummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusSummary = value; } /// Internal Acessors for StorageProfile - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal.StorageProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).StorageProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).StorageProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal.StorageProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).StorageProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).StorageProfile = value; } /// Internal Acessors for StorageProfileOSDiskImage - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal.StorageProfileOSDiskImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).StorageProfileOSDiskImage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).StorageProfileOSDiskImage = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal.StorageProfileOSDiskImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).StorageProfileOSDiskImage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).StorageProfileOSDiskImage = value; } /// Internal Acessors for StorageProfileSource - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdateInternal.StorageProfileSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).StorageProfileSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).StorageProfileSource = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdateInternal.StorageProfileSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).StorageProfileSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).StorageProfileSource = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type = value; } /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; } /// /// The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite' /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching? OSDiskImageHostCaching { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageHostCaching; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageHostCaching = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching? OSDiskImageHostCaching { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageHostCaching; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageHostCaching = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching)""); } /// This property indicates the size of the VHD to be created. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb; } + public int? OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb; } /// /// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string OSDiskImageSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSourceId = value ?? null; } + public string OSDiskImageSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSourceId = value ?? null; } /// /// The uri of the gallery artifact version source. Currently used to specify vhd/blob source. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string OSDiskImageSourceUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSourceUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSourceUri = value ?? null; } + public string OSDiskImageSourceUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSourceUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSourceUri = value ?? null; } /// /// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string PropertiesStorageProfileSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).Id = value ?? null; } + public string PropertiesStorageProfileSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).Id = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties _property; /// Describes the properties of a gallery image version. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionProperties()); set => this._property = value; } /// The provisioning state, which only appears in the response. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ProvisioningState; } /// /// The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property /// is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public global::System.DateTime? PublishingProfileEndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileEndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileEndOfLifeDate = value ?? default(global::System.DateTime); } + public global::System.DateTime? PublishingProfileEndOfLifeDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileEndOfLifeDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileEndOfLifeDate = value ?? default(global::System.DateTime); } /// /// If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public bool? PublishingProfileExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileExcludeFromLatest; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileExcludeFromLatest = value ?? default(bool); } + public bool? PublishingProfileExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileExcludeFromLatest; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileExcludeFromLatest = value ?? default(bool); } /// The timestamp for when the gallery image version is published. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public global::System.DateTime? PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfilePublishedDate; } + public global::System.DateTime? PublishingProfilePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfilePublishedDate; } /// /// The number of replicas of the Image Version to be created per region. This property would take effect for a region when /// regionalReplicaCount is not specified. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? PublishingProfileReplicaCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileReplicaCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileReplicaCount = value ?? default(int); } + public int? PublishingProfileReplicaCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileReplicaCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileReplicaCount = value ?? default(int); } /// /// Optional parameter which specifies the mode to be used for replication. This property is not updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode? PublishingProfileReplicationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileReplicationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileReplicationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode? PublishingProfileReplicationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileReplicationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileReplicationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); } /// /// Specifies the storage account type to be used to store the image. This property is not updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileStorageAccountType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileStorageAccountType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileStorageAccountType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileStorageAccountType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); } + + /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileTargetExtendedLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileTargetExtendedLocation = value ?? null /* arrayOf */; } /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] PublishingProfileTargetRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileTargetRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileTargetRegion = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] PublishingProfileTargetRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileTargetRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).PublishingProfileTargetRegion = value ?? null /* arrayOf */; } /// /// This is the aggregated replication status based on all the regional replication status flags. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusAggregatedState; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? ReplicationStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusAggregatedState; } /// This is a summary of replication status for each region. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusSummary; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).ReplicationStatusSummary; } /// A list of data disk images. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[] StorageProfileDataDiskImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).StorageProfileDataDiskImage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).StorageProfileDataDiskImage = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[] StorageProfileDataDiskImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).StorageProfileDataDiskImage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).StorageProfileDataDiskImage = value ?? null /* arrayOf */; } /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag = value ?? null /* model class */; } /// Resource type [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; } /// /// The uri of the gallery artifact version source. Currently used to specify vhd/blob source. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionPropertiesInternal)Property).Uri = value ?? null; } + public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).Uri = value ?? null; } /// Creates an new instance. public GalleryImageVersionUpdate() @@ -191,7 +197,7 @@ public GalleryImageVersionUpdate() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { @@ -202,7 +208,7 @@ public GalleryImageVersionUpdate() /// Specifies information about the gallery image version that you want to update. public partial interface IGalleryImageVersionUpdate : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinition + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinition { /// /// The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite' @@ -258,8 +264,8 @@ public partial interface IGalleryImageVersionUpdate : ReadOnly = true, Description = @"The provisioning state, which only appears in the response.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(string) })] - string ProvisioningState { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; } /// /// The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property /// is updatable. @@ -321,6 +327,16 @@ public partial interface IGalleryImageVersionUpdate : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType) })] Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get; set; } /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The target extended locations where the Image Version is going to be replicated to. This property is updatable.", + SerializedName = @"targetExtendedLocations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get; set; } + /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( @@ -328,8 +344,8 @@ public partial interface IGalleryImageVersionUpdate : ReadOnly = false, Description = @"The target regions where the Image Version is going to be replicated to. This property is updatable.", SerializedName = @"targetRegions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] PublishingProfileTargetRegion { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] PublishingProfileTargetRegion { get; set; } /// /// This is the aggregated replication status based on all the regional replication status flags. /// @@ -346,16 +362,16 @@ public partial interface IGalleryImageVersionUpdate : ReadOnly = true, Description = @"This is a summary of replication status for each region.", SerializedName = @"summary", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] ReplicationStatusSummary { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] ReplicationStatusSummary { get; } /// A list of data disk images. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, ReadOnly = false, Description = @"A list of data disk images.", SerializedName = @"dataDiskImages", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[] StorageProfileDataDiskImage { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[] StorageProfileDataDiskImage { get; set; } /// /// The uri of the gallery artifact version source. Currently used to specify vhd/blob source. /// @@ -370,7 +386,7 @@ public partial interface IGalleryImageVersionUpdate : } /// Specifies information about the gallery image version that you want to update. internal partial interface IGalleryImageVersionUpdateInternal : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal { /// /// The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite' @@ -379,7 +395,7 @@ internal partial interface IGalleryImageVersionUpdateInternal : /// This property indicates the size of the VHD to be created. int? OSDiskImageSizeInGb { get; set; } /// The gallery artifact version source. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource OSDiskImageSource { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource OSDiskImageSource { get; set; } /// /// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. /// @@ -393,11 +409,11 @@ internal partial interface IGalleryImageVersionUpdateInternal : /// string PropertiesStorageProfileSourceId { get; set; } /// Describes the properties of a gallery image version. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionProperties Property { get; set; } /// The provisioning state, which only appears in the response. - string ProvisioningState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; set; } /// Describes the basic gallery artifact publishing profile. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactPublishingProfileBase PublishingProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactPublishingProfileBase PublishingProfile { get; set; } /// /// The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property /// is updatable. @@ -423,25 +439,29 @@ internal partial interface IGalleryImageVersionUpdateInternal : /// Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? PublishingProfileStorageAccountType { get; set; } /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get; set; } + /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. /// - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] PublishingProfileTargetRegion { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] PublishingProfileTargetRegion { get; set; } /// This is the replication status of the gallery image version. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus ReplicationStatus { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus ReplicationStatus { get; set; } /// /// This is the aggregated replication status based on all the regional replication status flags. /// Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? ReplicationStatusAggregatedState { get; set; } /// This is a summary of replication status for each region. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] ReplicationStatusSummary { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] ReplicationStatusSummary { get; set; } /// This is the storage profile of a Gallery Image Version. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionStorageProfile StorageProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionStorageProfile StorageProfile { get; set; } /// A list of data disk images. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDataDiskImage[] StorageProfileDataDiskImage { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDataDiskImage[] StorageProfileDataDiskImage { get; set; } /// This is the disk image base class. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage StorageProfileOSDiskImage { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage StorageProfileOSDiskImage { get; set; } /// The gallery artifact version source. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource StorageProfileSource { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource StorageProfileSource { get; set; } /// /// The uri of the gallery artifact version source. Currently used to specify vhd/blob source. /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionUpdate.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionUpdate.json.cs similarity index 90% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionUpdate.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionUpdate.json.cs index 607d736fb397..024217e282f6 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryImageVersionUpdate.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersionUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryImageVersionUpdate partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryImageVersionUpdate /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryImageVersionUpdate /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryImageVersionUpdate partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryImageVersionUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryImageVersionUpdate(json) : null; } @@ -75,8 +77,8 @@ internal GalleryImageVersionUpdate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Ru { return; } - __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinition(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryImageVersionProperties.FromJson(__jsonProperties) : Property;} + __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinition(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryList.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryList.PowerShell.cs similarity index 70% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryList.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryList.PowerShell.cs index 8f25a5f72e97..704f57e06212 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryList.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class GalleryList /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class GalleryList /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class GalleryList partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GalleryList(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GalleryList(content); } @@ -82,11 +84,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGal /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -99,13 +101,19 @@ internal GalleryList(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryListInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -118,8 +126,14 @@ internal GalleryList(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryListInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryList.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryList.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryList.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryList.TypeConverter.cs index dc8d5ccf45ad..5df8cf594e17 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryList.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryListTypeConverter : global::System.Management.Automa { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryList.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryList.cs similarity index 92% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryList.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryList.cs index e8c54f42c07e..96df04c5a9b4 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryList.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryList.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// The List Galleries operation response. public partial class GalleryList : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryList, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryListInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryList, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryListInternal { /// Backing field for property. @@ -23,11 +23,11 @@ public partial class GalleryList : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery[] _value; /// A list of galleries. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public GalleryList() @@ -55,8 +55,8 @@ public partial interface IGalleryList : ReadOnly = false, Description = @"A list of galleries.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery[] Value { get; set; } } /// The List Galleries operation response. @@ -68,7 +68,7 @@ internal partial interface IGalleryListInternal /// string NextLink { get; set; } /// A list of galleries. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery[] Value { get; set; } } } \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryList.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryList.json.cs similarity index 90% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryList.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryList.json.cs index bfb34f2415bf..681c7f0fa281 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryList.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryList partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryList /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryList /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryList FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryList FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryList(json) : null; } @@ -75,7 +77,7 @@ internal GalleryList(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.Jso { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGallery) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.Gallery.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Gallery.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryOSDiskImage.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryOSDiskImage.PowerShell.cs similarity index 55% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryOSDiskImage.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryOSDiskImage.PowerShell.cs index d14b966ffe70..6d812759a7a9 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryOSDiskImage.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryOSDiskImage.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class GalleryOSDiskImage /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class GalleryOSDiskImage /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class GalleryOSDiskImage partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryOSDiskImage DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryOSDiskImage DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GalleryOSDiskImage(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryOSDiskImage DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryOSDiskImage DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GalleryOSDiskImage(content); } @@ -82,11 +84,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGal /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryOSDiskImage FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryOSDiskImage FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -99,16 +101,31 @@ internal GalleryOSDiskImage(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SizeInGb = (int?) content.GetValueForProperty("SizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).HostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("HostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).HostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); + if (content.Contains("SourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceId, global::System.Convert.ToString); + } + if (content.Contains("SourceUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceUri, global::System.Convert.ToString); + } + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("SizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SizeInGb = (int?) content.GetValueForProperty("SizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HostCaching")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).HostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("HostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).HostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -121,11 +138,26 @@ internal GalleryOSDiskImage(global::System.Management.Automation.PSObject conten return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SourceUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SizeInGb = (int?) content.GetValueForProperty("SizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).SizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).HostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("HostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)this).HostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); + if (content.Contains("SourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceId, global::System.Convert.ToString); + } + if (content.Contains("SourceUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SourceUri, global::System.Convert.ToString); + } + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryArtifactVersionSourceTypeConverter.ConvertFrom); + } + if (content.Contains("SizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SizeInGb = (int?) content.GetValueForProperty("SizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).SizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HostCaching")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).HostCaching = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching?) content.GetValueForProperty("HostCaching",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)this).HostCaching, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching.CreateFrom); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryOSDiskImage.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryOSDiskImage.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryOSDiskImage.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryOSDiskImage.TypeConverter.cs index 0d86d3724b41..8bfcd7acfd2e 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryOSDiskImage.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryOSDiskImage.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryOSDiskImageTypeConverter : global::System.Management { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryOSDiskImage ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryOSDiskImage ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryOSDiskImage).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryOSDiskImage).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryOSDiskImage.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryOSDiskImage.cs similarity index 78% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryOSDiskImage.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryOSDiskImage.cs index e5eda416a6c6..2a88bd96f269 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryOSDiskImage.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryOSDiskImage.cs @@ -3,50 +3,50 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// This is the OS disk image. public partial class GalleryOSDiskImage : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryOSDiskImage, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryOSDiskImageInternal, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryOSDiskImage, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryOSDiskImageInternal, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage __galleryDiskImage = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDiskImage(); + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage __galleryDiskImage = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDiskImage(); /// /// The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite' /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching? HostCaching { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).HostCaching; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).HostCaching = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching? HostCaching { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).HostCaching; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).HostCaching = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching)""); } /// Internal Acessors for SizeInGb - int? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal.SizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).SizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).SizeInGb = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal.SizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).SizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).SizeInGb = value; } /// This property indicates the size of the VHD to be created. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public int? SizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).SizeInGb; } + public int? SizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).SizeInGb; } /// The gallery artifact version source. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryArtifactVersionSource Source { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).Source; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).Source = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource Source { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).Source; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).Source = value ?? null /* model class */; } /// /// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string SourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).SourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).SourceId = value ?? null; } + public string SourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).SourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).SourceId = value ?? null; } /// /// The uri of the gallery artifact version source. Currently used to specify vhd/blob source. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string SourceUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).SourceUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal)__galleryDiskImage).SourceUri = value ?? null; } + public string SourceUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).SourceUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal)__galleryDiskImage).SourceUri = value ?? null; } /// Creates an new instance. public GalleryOSDiskImage() @@ -58,7 +58,7 @@ public GalleryOSDiskImage() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { @@ -69,13 +69,13 @@ public GalleryOSDiskImage() /// This is the OS disk image. public partial interface IGalleryOSDiskImage : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImage + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImage { } /// This is the OS disk image. internal partial interface IGalleryOSDiskImageInternal : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryDiskImageInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryDiskImageInternal { } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryOSDiskImage.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryOSDiskImage.json.cs similarity index 90% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryOSDiskImage.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryOSDiskImage.json.cs index 3a160c3ddd13..d17ff887caff 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryOSDiskImage.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryOSDiskImage.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryOSDiskImage partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryOSDiskImage /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryOSDiskImage /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryOSDiskImage partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryOSDiskImage. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryOSDiskImage. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryOSDiskImage. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryOSDiskImage. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryOSDiskImage FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryOSDiskImage FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryOSDiskImage(json) : null; } @@ -75,7 +77,7 @@ internal GalleryOSDiskImage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.J { return; } - __galleryDiskImage = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryDiskImage(json); + __galleryDiskImage = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryDiskImage(json); AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryProperties.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryProperties.PowerShell.cs new file mode 100644 index 000000000000..d46ee699c8bc --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryProperties.PowerShell.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Describes the properties of a Shared Image Gallery. + [System.ComponentModel.TypeConverter(typeof(GalleryPropertiesTypeConverter))] + public partial class GalleryProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Identifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryIdentifierTypeConverter.ConvertFrom); + } + if (content.Contains("SharingProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile) content.GetValueForProperty("SharingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SoftDeletePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SoftDeletePolicy = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy) content.GetValueForProperty("SoftDeletePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SoftDeletePolicy, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SoftDeletePolicyTypeConverter.ConvertFrom); + } + if (content.Contains("SharingStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus) content.GetValueForProperty("SharingStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingStatusTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("SharingProfileGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingProfileGroup = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[]) content.GetValueForProperty("SharingProfileGroup",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingProfileGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfileGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("SharingStatusSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[]) content.GetValueForProperty("SharingStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalSharingStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("IdentifierUniqueName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).IdentifierUniqueName = (string) content.GetValueForProperty("IdentifierUniqueName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).IdentifierUniqueName, global::System.Convert.ToString); + } + if (content.Contains("SharingProfilePermission")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingProfilePermission = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes?) content.GetValueForProperty("SharingProfilePermission",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingProfilePermission, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes.CreateFrom); + } + if (content.Contains("SharingProfileCommunityGalleryInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingProfileCommunityGalleryInfo = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny) content.GetValueForProperty("SharingProfileCommunityGalleryInfo",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingProfileCommunityGalleryInfo, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("SoftDeletePolicyIsSoftDeleteEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SoftDeletePolicyIsSoftDeleteEnabled = (bool?) content.GetValueForProperty("SoftDeletePolicyIsSoftDeleteEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SoftDeletePolicyIsSoftDeleteEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SharingStatusAggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState?) content.GetValueForProperty("SharingStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Identifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryIdentifierTypeConverter.ConvertFrom); + } + if (content.Contains("SharingProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile) content.GetValueForProperty("SharingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SoftDeletePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SoftDeletePolicy = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy) content.GetValueForProperty("SoftDeletePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SoftDeletePolicy, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SoftDeletePolicyTypeConverter.ConvertFrom); + } + if (content.Contains("SharingStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus) content.GetValueForProperty("SharingStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingStatusTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("SharingProfileGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingProfileGroup = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[]) content.GetValueForProperty("SharingProfileGroup",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingProfileGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfileGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("SharingStatusSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[]) content.GetValueForProperty("SharingStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalSharingStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("IdentifierUniqueName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).IdentifierUniqueName = (string) content.GetValueForProperty("IdentifierUniqueName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).IdentifierUniqueName, global::System.Convert.ToString); + } + if (content.Contains("SharingProfilePermission")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingProfilePermission = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes?) content.GetValueForProperty("SharingProfilePermission",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingProfilePermission, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes.CreateFrom); + } + if (content.Contains("SharingProfileCommunityGalleryInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingProfileCommunityGalleryInfo = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny) content.GetValueForProperty("SharingProfileCommunityGalleryInfo",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingProfileCommunityGalleryInfo, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("SoftDeletePolicyIsSoftDeleteEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SoftDeletePolicyIsSoftDeleteEnabled = (bool?) content.GetValueForProperty("SoftDeletePolicyIsSoftDeleteEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SoftDeletePolicyIsSoftDeleteEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SharingStatusAggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState?) content.GetValueForProperty("SharingStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)this).SharingStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Describes the properties of a Shared Image Gallery. + [System.ComponentModel.TypeConverter(typeof(GalleryPropertiesTypeConverter))] + public partial interface IGalleryProperties + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryProperties.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryProperties.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryProperties.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryProperties.TypeConverter.cs index d0a58ec5dff6..8567685b6fc2 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryProperties.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryPropertiesTypeConverter : global::System.Management. { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryProperties.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryProperties.cs similarity index 54% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryProperties.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryProperties.cs index 2fa698910832..67e77bb5ef12 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryProperties.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// Describes the properties of a Shared Image Gallery. public partial class GalleryProperties : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal { /// Backing field for property. @@ -23,73 +23,98 @@ public partial class GalleryProperties : public string Description { get => this._description; set => this._description = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier _identifier; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier _identifier; /// Describes the gallery unique name. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier Identifier { get => (this._identifier = this._identifier ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryIdentifier()); set => this._identifier = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier Identifier { get => (this._identifier = this._identifier ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryIdentifier()); set => this._identifier = value; } /// /// The unique name of the Shared Image Gallery. This name is generated automatically by Azure. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string IdentifierUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifierInternal)Identifier).UniqueName; } + public string IdentifierUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifierInternal)Identifier).UniqueName; } /// Internal Acessors for Identifier - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal.Identifier { get => (this._identifier = this._identifier ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryIdentifier()); set { {_identifier = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal.Identifier { get => (this._identifier = this._identifier ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryIdentifier()); set { {_identifier = value;} } } /// Internal Acessors for IdentifierUniqueName - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal.IdentifierUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifierInternal)Identifier).UniqueName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifierInternal)Identifier).UniqueName = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal.IdentifierUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifierInternal)Identifier).UniqueName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifierInternal)Identifier).UniqueName = value; } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for SharingProfile - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal.SharingProfile { get => (this._sharingProfile = this._sharingProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfile()); set { {_sharingProfile = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal.SharingProfile { get => (this._sharingProfile = this._sharingProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfile()); set { {_sharingProfile = value;} } } /// Internal Acessors for SharingProfileGroup - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal.SharingProfileGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileInternal)SharingProfile).Group; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileInternal)SharingProfile).Group = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal.SharingProfileGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal)SharingProfile).Group; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal)SharingProfile).Group = value; } + + /// Internal Acessors for SharingStatus + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal.SharingStatus { get => (this._sharingStatus = this._sharingStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingStatus()); set { {_sharingStatus = value;} } } + + /// Internal Acessors for SharingStatusAggregatedState + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal.SharingStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatusInternal)SharingStatus).AggregatedState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatusInternal)SharingStatus).AggregatedState = value; } /// Internal Acessors for SoftDeletePolicy - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal.SoftDeletePolicy { get => (this._softDeletePolicy = this._softDeletePolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SoftDeletePolicy()); set { {_softDeletePolicy = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal.SoftDeletePolicy { get => (this._softDeletePolicy = this._softDeletePolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SoftDeletePolicy()); set { {_softDeletePolicy = value;} } } /// Backing field for property. - private string _provisioningState; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? _provisioningState; /// The provisioning state, which only appears in the response. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - public string ProvisioningState { get => this._provisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get => this._provisioningState; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile _sharingProfile; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile _sharingProfile; /// Profile for gallery sharing to subscription or tenant [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile SharingProfile { get => (this._sharingProfile = this._sharingProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfile()); set => this._sharingProfile = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile SharingProfile { get => (this._sharingProfile = this._sharingProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfile()); set => this._sharingProfile = value; } + + /// Information of community gallery if current gallery is shared to community. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny SharingProfileCommunityGalleryInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal)SharingProfile).CommunityGalleryInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal)SharingProfile).CommunityGalleryInfo = value ?? null /* model class */; } /// A list of sharing profile groups. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] SharingProfileGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileInternal)SharingProfile).Group; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] SharingProfileGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal)SharingProfile).Group; } /// /// This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private** - ///

**Groups** + ///

**Groups**

**Community** ///
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes? SharingProfilePermission { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileInternal)SharingProfile).Permission; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileInternal)SharingProfile).Permission = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes? SharingProfilePermission { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal)SharingProfile).Permission; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal)SharingProfile).Permission = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus _sharingStatus; + + /// Sharing status of current gallery. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus SharingStatus { get => (this._sharingStatus = this._sharingStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingStatus()); } + + /// Aggregated sharing state of current gallery. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? SharingStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatusInternal)SharingStatus).AggregatedState; } + + /// Summary of all regional sharing status. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[] SharingStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatusInternal)SharingStatus).Summary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatusInternal)SharingStatus).Summary = value ?? null /* arrayOf */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy _softDeletePolicy; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy _softDeletePolicy; /// Contains information about the soft deletion policy of the gallery. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy SoftDeletePolicy { get => (this._softDeletePolicy = this._softDeletePolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SoftDeletePolicy()); set => this._softDeletePolicy = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy SoftDeletePolicy { get => (this._softDeletePolicy = this._softDeletePolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SoftDeletePolicy()); set => this._softDeletePolicy = value; } /// /// Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public bool? SoftDeletePolicyIsSoftDeleteEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicyInternal)SoftDeletePolicy).IsSoftDeleteEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicyInternal)SoftDeletePolicy).IsSoftDeleteEnabled = value ?? default(bool); } + public bool? SoftDeletePolicyIsSoftDeleteEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicyInternal)SoftDeletePolicy).IsSoftDeleteEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicyInternal)SoftDeletePolicy).IsSoftDeleteEnabled = value ?? default(bool); } /// Creates an new instance. public GalleryProperties() @@ -127,27 +152,51 @@ public partial interface IGalleryProperties : ReadOnly = true, Description = @"The provisioning state, which only appears in the response.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(string) })] - string ProvisioningState { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; } + /// Information of community gallery if current gallery is shared to community. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Information of community gallery if current gallery is shared to community.", + SerializedName = @"communityGalleryInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny SharingProfileCommunityGalleryInfo { get; set; } /// A list of sharing profile groups. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, ReadOnly = true, Description = @"A list of sharing profile groups.", SerializedName = @"groups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] SharingProfileGroup { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] SharingProfileGroup { get; } /// /// This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private** - ///

**Groups** + ///

**Groups**

**Community** ///
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, ReadOnly = false, - Description = @"This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private**

**Groups**", + Description = @"This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private**

**Groups**

**Community**", SerializedName = @"permissions", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes) })] Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes? SharingProfilePermission { get; set; } + /// Aggregated sharing state of current gallery. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Aggregated sharing state of current gallery.", + SerializedName = @"aggregatedState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? SharingStatusAggregatedState { get; } + /// Summary of all regional sharing status. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Summary of all regional sharing status.", + SerializedName = @"summary", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[] SharingStatusSummary { get; set; } /// /// Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time. /// @@ -169,24 +218,32 @@ internal partial interface IGalleryPropertiesInternal /// string Description { get; set; } /// Describes the gallery unique name. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier Identifier { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier Identifier { get; set; } /// /// The unique name of the Shared Image Gallery. This name is generated automatically by Azure. /// string IdentifierUniqueName { get; set; } /// The provisioning state, which only appears in the response. - string ProvisioningState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; set; } /// Profile for gallery sharing to subscription or tenant - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile SharingProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile SharingProfile { get; set; } + /// Information of community gallery if current gallery is shared to community. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny SharingProfileCommunityGalleryInfo { get; set; } /// A list of sharing profile groups. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] SharingProfileGroup { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] SharingProfileGroup { get; set; } /// /// This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private** - ///

**Groups** + ///

**Groups**

**Community** ///
Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes? SharingProfilePermission { get; set; } + /// Sharing status of current gallery. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus SharingStatus { get; set; } + /// Aggregated sharing state of current gallery. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? SharingStatusAggregatedState { get; set; } + /// Summary of all regional sharing status. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[] SharingStatusSummary { get; set; } /// Contains information about the soft deletion policy of the gallery. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy SoftDeletePolicy { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy SoftDeletePolicy { get; set; } /// /// Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time. /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryProperties.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryProperties.json.cs similarity index 85% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryProperties.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryProperties.json.cs index df5106747009..280281dc92e3 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryProperties.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryProperties partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryProperties /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryProperties /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryProperties(json) : null; } @@ -75,9 +77,10 @@ internal GalleryProperties(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Js { return; } - {_identifier = If( json?.PropertyT("identifier"), out var __jsonIdentifier) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryIdentifier.FromJson(__jsonIdentifier) : Identifier;} - {_sharingProfile = If( json?.PropertyT("sharingProfile"), out var __jsonSharingProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfile.FromJson(__jsonSharingProfile) : SharingProfile;} - {_softDeletePolicy = If( json?.PropertyT("softDeletePolicy"), out var __jsonSoftDeletePolicy) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SoftDeletePolicy.FromJson(__jsonSoftDeletePolicy) : SoftDeletePolicy;} + {_identifier = If( json?.PropertyT("identifier"), out var __jsonIdentifier) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryIdentifier.FromJson(__jsonIdentifier) : Identifier;} + {_sharingProfile = If( json?.PropertyT("sharingProfile"), out var __jsonSharingProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfile.FromJson(__jsonSharingProfile) : SharingProfile;} + {_softDeletePolicy = If( json?.PropertyT("softDeletePolicy"), out var __jsonSoftDeletePolicy) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SoftDeletePolicy.FromJson(__jsonSoftDeletePolicy) : SoftDeletePolicy;} + {_sharingStatus = If( json?.PropertyT("sharingStatus"), out var __jsonSharingStatus) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingStatus.FromJson(__jsonSharingStatus) : SharingStatus;} {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} AfterFromJson(json); @@ -105,6 +108,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode ToJson(M AddIf( null != this._identifier ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) this._identifier.ToJson(null,serializationMode) : null, "identifier" ,container.Add ); AddIf( null != this._sharingProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) this._sharingProfile.ToJson(null,serializationMode) : null, "sharingProfile" ,container.Add ); AddIf( null != this._softDeletePolicy ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) this._softDeletePolicy.ToJson(null,serializationMode) : null, "softDeletePolicy" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._sharingStatus ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) this._sharingStatus.ToJson(null,serializationMode) : null, "sharingStatus" ,container.Add ); + } AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeReadOnly)) { diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryTargetExtendedLocation.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryTargetExtendedLocation.PowerShell.cs new file mode 100644 index 000000000000..316e2022814a --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryTargetExtendedLocation.PowerShell.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(GalleryTargetExtendedLocationTypeConverter))] + public partial class GalleryTargetExtendedLocation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryTargetExtendedLocation(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryTargetExtendedLocation(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryTargetExtendedLocation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).ExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocation) content.GetValueForProperty("ExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).ExtendedLocation, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryExtendedLocationTypeConverter.ConvertFrom); + } + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.EncryptionImagesTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("ExtendedLocationReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).ExtendedLocationReplicaCount = (int?) content.GetValueForProperty("ExtendedLocationReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).ExtendedLocationReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).StorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("StorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).StorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("ExtendedLocationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).ExtendedLocationName = (string) content.GetValueForProperty("ExtendedLocationName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).ExtendedLocationName, global::System.Convert.ToString); + } + if (content.Contains("ExtendedLocationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).ExtendedLocationType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType?) content.GetValueForProperty("ExtendedLocationType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).ExtendedLocationType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType.CreateFrom); + } + if (content.Contains("EncryptionOSDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).EncryptionOSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption) content.GetValueForProperty("EncryptionOSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).EncryptionOSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageEncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("EncryptionDataDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).EncryptionDataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption[]) content.GetValueForProperty("EncryptionDataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).EncryptionDataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DataDiskImageEncryptionTypeConverter.ConvertFrom)); + } + if (content.Contains("OSDiskImageDiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).OSDiskImageDiskEncryptionSetId = (string) content.GetValueForProperty("OSDiskImageDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).OSDiskImageDiskEncryptionSetId, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).OSDiskImageSecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile) content.GetValueForProperty("OSDiskImageSecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).OSDiskImageSecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageSecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfileConfidentialVMEncryptionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).SecurityProfileConfidentialVMEncryptionType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType?) content.GetValueForProperty("SecurityProfileConfidentialVMEncryptionType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).SecurityProfileConfidentialVMEncryptionType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType.CreateFrom); + } + if (content.Contains("SecurityProfileSecureVMDiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).SecurityProfileSecureVMDiskEncryptionSetId = (string) content.GetValueForProperty("SecurityProfileSecureVMDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).SecurityProfileSecureVMDiskEncryptionSetId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryTargetExtendedLocation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).ExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocation) content.GetValueForProperty("ExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).ExtendedLocation, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryExtendedLocationTypeConverter.ConvertFrom); + } + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.EncryptionImagesTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("ExtendedLocationReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).ExtendedLocationReplicaCount = (int?) content.GetValueForProperty("ExtendedLocationReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).ExtendedLocationReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).StorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("StorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).StorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("ExtendedLocationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).ExtendedLocationName = (string) content.GetValueForProperty("ExtendedLocationName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).ExtendedLocationName, global::System.Convert.ToString); + } + if (content.Contains("ExtendedLocationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).ExtendedLocationType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType?) content.GetValueForProperty("ExtendedLocationType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).ExtendedLocationType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType.CreateFrom); + } + if (content.Contains("EncryptionOSDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).EncryptionOSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption) content.GetValueForProperty("EncryptionOSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).EncryptionOSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageEncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("EncryptionDataDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).EncryptionDataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption[]) content.GetValueForProperty("EncryptionDataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).EncryptionDataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DataDiskImageEncryptionTypeConverter.ConvertFrom)); + } + if (content.Contains("OSDiskImageDiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).OSDiskImageDiskEncryptionSetId = (string) content.GetValueForProperty("OSDiskImageDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).OSDiskImageDiskEncryptionSetId, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).OSDiskImageSecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile) content.GetValueForProperty("OSDiskImageSecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).OSDiskImageSecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageSecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfileConfidentialVMEncryptionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).SecurityProfileConfidentialVMEncryptionType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType?) content.GetValueForProperty("SecurityProfileConfidentialVMEncryptionType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).SecurityProfileConfidentialVMEncryptionType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType.CreateFrom); + } + if (content.Contains("SecurityProfileSecureVMDiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).SecurityProfileSecureVMDiskEncryptionSetId = (string) content.GetValueForProperty("SecurityProfileSecureVMDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal)this).SecurityProfileSecureVMDiskEncryptionSetId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(GalleryTargetExtendedLocationTypeConverter))] + public partial interface IGalleryTargetExtendedLocation + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryTargetExtendedLocation.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryTargetExtendedLocation.TypeConverter.cs new file mode 100644 index 000000000000..e166c646ac99 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryTargetExtendedLocation.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class GalleryTargetExtendedLocationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return GalleryTargetExtendedLocation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return GalleryTargetExtendedLocation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return GalleryTargetExtendedLocation.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryTargetExtendedLocation.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryTargetExtendedLocation.cs new file mode 100644 index 000000000000..04d66aab55aa --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryTargetExtendedLocation.cs @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + public partial class GalleryTargetExtendedLocation : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages _encryption; + + /// + /// Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.EncryptionImages()); set => this._encryption = value; } + + /// A list of encryption specifications for data disk images. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption[] EncryptionDataDiskImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).DataDiskImage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).DataDiskImage = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocation _extendedLocation; + + /// The name of the extended location. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocation ExtendedLocation { get => (this._extendedLocation = this._extendedLocation ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryExtendedLocation()); set => this._extendedLocation = value; } + + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string ExtendedLocationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocationInternal)ExtendedLocation).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocationInternal)ExtendedLocation).Name = value ?? null; } + + /// Backing field for property. + private int? _extendedLocationReplicaCount; + + /// + /// The number of replicas of the Image Version to be created per extended location. This property is updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public int? ExtendedLocationReplicaCount { get => this._extendedLocationReplicaCount; set => this._extendedLocationReplicaCount = value; } + + /// It is type of the extended location. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType? ExtendedLocationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocationInternal)ExtendedLocation).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocationInternal)ExtendedLocation).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType)""); } + + /// Internal Acessors for Encryption + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal.Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.EncryptionImages()); set { {_encryption = value;} } } + + /// Internal Acessors for EncryptionOSDiskImage + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal.EncryptionOSDiskImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).OSDiskImage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).OSDiskImage = value; } + + /// Internal Acessors for ExtendedLocation + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocation Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal.ExtendedLocation { get => (this._extendedLocation = this._extendedLocation ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryExtendedLocation()); set { {_extendedLocation = value;} } } + + /// Internal Acessors for OSDiskImageSecurityProfile + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocationInternal.OSDiskImageSecurityProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).OSDiskImageSecurityProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).OSDiskImageSecurityProfile = value; } + + /// Backing field for property. + private string _name; + + /// The name of the region. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// A relative URI containing the resource ID of the disk encryption set. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string OSDiskImageDiskEncryptionSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).OSDiskImageDiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).OSDiskImageDiskEncryptionSetId = value ?? null; } + + /// confidential VM encryption types + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType? SecurityProfileConfidentialVMEncryptionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).SecurityProfileConfidentialVMEncryptionType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).SecurityProfileConfidentialVMEncryptionType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType)""); } + + /// secure VM disk encryption set id + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string SecurityProfileSecureVMDiskEncryptionSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).SecurityProfileSecureVMDiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).SecurityProfileSecureVMDiskEncryptionSetId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? _storageAccountType; + + /// + /// Specifies the storage account type to be used to store the image. This property is not updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? StorageAccountType { get => this._storageAccountType; set => this._storageAccountType = value; } + + /// Creates an new instance. + public GalleryTargetExtendedLocation() + { + + } + } + public partial interface IGalleryTargetExtendedLocation : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// A list of encryption specifications for data disk images. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of encryption specifications for data disk images.", + SerializedName = @"dataDiskImages", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption[] EncryptionDataDiskImage { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string ExtendedLocationName { get; set; } + /// + /// The number of replicas of the Image Version to be created per extended location. This property is updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of replicas of the Image Version to be created per extended location. This property is updatable.", + SerializedName = @"extendedLocationReplicaCount", + PossibleTypes = new [] { typeof(int) })] + int? ExtendedLocationReplicaCount { get; set; } + /// It is type of the extended location. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"It is type of the extended location.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType? ExtendedLocationType { get; set; } + /// The name of the region. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the region.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// A relative URI containing the resource ID of the disk encryption set. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A relative URI containing the resource ID of the disk encryption set.", + SerializedName = @"diskEncryptionSetId", + PossibleTypes = new [] { typeof(string) })] + string OSDiskImageDiskEncryptionSetId { get; set; } + /// confidential VM encryption types + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"confidential VM encryption types", + SerializedName = @"confidentialVMEncryptionType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType? SecurityProfileConfidentialVMEncryptionType { get; set; } + /// secure VM disk encryption set id + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"secure VM disk encryption set id", + SerializedName = @"secureVMDiskEncryptionSetId", + PossibleTypes = new [] { typeof(string) })] + string SecurityProfileSecureVMDiskEncryptionSetId { get; set; } + /// + /// Specifies the storage account type to be used to store the image. This property is not updatable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the storage account type to be used to store the image. This property is not updatable.", + SerializedName = @"storageAccountType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? StorageAccountType { get; set; } + + } + internal partial interface IGalleryTargetExtendedLocationInternal + + { + /// + /// Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. + /// + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages Encryption { get; set; } + /// A list of encryption specifications for data disk images. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption[] EncryptionDataDiskImage { get; set; } + /// Contains encryption settings for an OS disk image. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption EncryptionOSDiskImage { get; set; } + /// The name of the extended location. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryExtendedLocation ExtendedLocation { get; set; } + + string ExtendedLocationName { get; set; } + /// + /// The number of replicas of the Image Version to be created per extended location. This property is updatable. + /// + int? ExtendedLocationReplicaCount { get; set; } + /// It is type of the extended location. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType? ExtendedLocationType { get; set; } + /// The name of the region. + string Name { get; set; } + /// A relative URI containing the resource ID of the disk encryption set. + string OSDiskImageDiskEncryptionSetId { get; set; } + /// This property specifies the security profile of an OS disk image. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile OSDiskImageSecurityProfile { get; set; } + /// confidential VM encryption types + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType? SecurityProfileConfidentialVMEncryptionType { get; set; } + /// secure VM disk encryption set id + string SecurityProfileSecureVMDiskEncryptionSetId { get; set; } + /// + /// Specifies the storage account type to be used to store the image. This property is not updatable. + /// + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? StorageAccountType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryTargetExtendedLocation.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryTargetExtendedLocation.json.cs new file mode 100644 index 000000000000..68f844f55356 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryTargetExtendedLocation.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + public partial class GalleryTargetExtendedLocation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryTargetExtendedLocation(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal GalleryTargetExtendedLocation(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_extendedLocation = If( json?.PropertyT("extendedLocation"), out var __jsonExtendedLocation) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryExtendedLocation.FromJson(__jsonExtendedLocation) : ExtendedLocation;} + {_encryption = If( json?.PropertyT("encryption"), out var __jsonEncryption) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.EncryptionImages.FromJson(__jsonEncryption) : Encryption;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_extendedLocationReplicaCount = If( json?.PropertyT("extendedLocationReplicaCount"), out var __jsonExtendedLocationReplicaCount) ? (int?)__jsonExtendedLocationReplicaCount : ExtendedLocationReplicaCount;} + {_storageAccountType = If( json?.PropertyT("storageAccountType"), out var __jsonStorageAccountType) ? (string)__jsonStorageAccountType : (string)StorageAccountType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._extendedLocation ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) this._extendedLocation.ToJson(null,serializationMode) : null, "extendedLocation" ,container.Add ); + AddIf( null != this._encryption ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) this._encryption.ToJson(null,serializationMode) : null, "encryption" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != this._extendedLocationReplicaCount ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNumber((int)this._extendedLocationReplicaCount) : null, "extendedLocationReplicaCount" ,container.Add ); + AddIf( null != (((object)this._storageAccountType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._storageAccountType.ToString()) : null, "storageAccountType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryUpdate.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryUpdate.PowerShell.cs new file mode 100644 index 000000000000..a70c6f389a63 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryUpdate.PowerShell.cs @@ -0,0 +1,280 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Specifies information about the Shared Image Gallery that you want to update. + [System.ComponentModel.TypeConverter(typeof(GalleryUpdateTypeConverter))] + public partial class GalleryUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GalleryUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GalleryUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GalleryUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SharingProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile) content.GetValueForProperty("SharingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SharingStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus) content.GetValueForProperty("SharingStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingStatusTypeConverter.ConvertFrom); + } + if (content.Contains("Identifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryIdentifierTypeConverter.ConvertFrom); + } + if (content.Contains("SoftDeletePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SoftDeletePolicy = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy) content.GetValueForProperty("SoftDeletePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SoftDeletePolicy, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SoftDeletePolicyTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("SharingProfileGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingProfileGroup = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[]) content.GetValueForProperty("SharingProfileGroup",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingProfileGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfileGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("SharingStatusSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[]) content.GetValueForProperty("SharingStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalSharingStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("IdentifierUniqueName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).IdentifierUniqueName = (string) content.GetValueForProperty("IdentifierUniqueName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).IdentifierUniqueName, global::System.Convert.ToString); + } + if (content.Contains("SharingProfilePermission")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingProfilePermission = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes?) content.GetValueForProperty("SharingProfilePermission",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingProfilePermission, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes.CreateFrom); + } + if (content.Contains("SharingProfileCommunityGalleryInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingProfileCommunityGalleryInfo = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny) content.GetValueForProperty("SharingProfileCommunityGalleryInfo",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingProfileCommunityGalleryInfo, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("SoftDeletePolicyIsSoftDeleteEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SoftDeletePolicyIsSoftDeleteEnabled = (bool?) content.GetValueForProperty("SoftDeletePolicyIsSoftDeleteEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SoftDeletePolicyIsSoftDeleteEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SharingStatusAggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState?) content.GetValueForProperty("SharingStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GalleryUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SharingProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile) content.GetValueForProperty("SharingProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SharingStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus) content.GetValueForProperty("SharingStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingStatusTypeConverter.ConvertFrom); + } + if (content.Contains("Identifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).Identifier = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier) content.GetValueForProperty("Identifier",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).Identifier, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryIdentifierTypeConverter.ConvertFrom); + } + if (content.Contains("SoftDeletePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SoftDeletePolicy = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy) content.GetValueForProperty("SoftDeletePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SoftDeletePolicy, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SoftDeletePolicyTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState.CreateFrom); + } + if (content.Contains("SharingProfileGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingProfileGroup = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[]) content.GetValueForProperty("SharingProfileGroup",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingProfileGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfileGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("SharingStatusSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingStatusSummary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[]) content.GetValueForProperty("SharingStatusSummary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingStatusSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalSharingStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("IdentifierUniqueName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).IdentifierUniqueName = (string) content.GetValueForProperty("IdentifierUniqueName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).IdentifierUniqueName, global::System.Convert.ToString); + } + if (content.Contains("SharingProfilePermission")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingProfilePermission = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes?) content.GetValueForProperty("SharingProfilePermission",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingProfilePermission, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes.CreateFrom); + } + if (content.Contains("SharingProfileCommunityGalleryInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingProfileCommunityGalleryInfo = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny) content.GetValueForProperty("SharingProfileCommunityGalleryInfo",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingProfileCommunityGalleryInfo, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("SoftDeletePolicyIsSoftDeleteEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SoftDeletePolicyIsSoftDeleteEnabled = (bool?) content.GetValueForProperty("SoftDeletePolicyIsSoftDeleteEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SoftDeletePolicyIsSoftDeleteEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SharingStatusAggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingStatusAggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState?) content.GetValueForProperty("SharingStatusAggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal)this).SharingStatusAggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Specifies information about the Shared Image Gallery that you want to update. + [System.ComponentModel.TypeConverter(typeof(GalleryUpdateTypeConverter))] + public partial interface IGalleryUpdate + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryUpdate.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryUpdate.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryUpdate.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryUpdate.TypeConverter.cs index 52ff7d9b7f2d..194b0335b362 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryUpdate.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class GalleryUpdateTypeConverter : global::System.Management.Auto { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryUpdate.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryUpdate.cs similarity index 54% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryUpdate.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryUpdate.cs index 592532210274..f51d75f62c68 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryUpdate.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryUpdate.cs @@ -3,107 +3,125 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// Specifies information about the Shared Image Gallery that you want to update. public partial class GalleryUpdate : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdate, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinition __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinition(); + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinition __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinition(); /// /// The description of this Shared Image Gallery resource. This property is updatable. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).Description = value ?? null; } + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).Description = value ?? null; } /// Resource Id [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; } /// /// The unique name of the Shared Image Gallery. This name is generated automatically by Azure. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string IdentifierUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).IdentifierUniqueName; } + public string IdentifierUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).IdentifierUniqueName; } /// Internal Acessors for Identifier - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal.Identifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).Identifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).Identifier = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal.Identifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).Identifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).Identifier = value; } /// Internal Acessors for IdentifierUniqueName - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal.IdentifierUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).IdentifierUniqueName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).IdentifierUniqueName = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal.IdentifierUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).IdentifierUniqueName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).IdentifierUniqueName = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for SharingProfile - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal.SharingProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SharingProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SharingProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal.SharingProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingProfile = value; } /// Internal Acessors for SharingProfileGroup - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal.SharingProfileGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SharingProfileGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SharingProfileGroup = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal.SharingProfileGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingProfileGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingProfileGroup = value; } + + /// Internal Acessors for SharingStatus + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal.SharingStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingStatus = value; } + + /// Internal Acessors for SharingStatusAggregatedState + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal.SharingStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingStatusAggregatedState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingStatusAggregatedState = value; } /// Internal Acessors for SoftDeletePolicy - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdateInternal.SoftDeletePolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SoftDeletePolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SoftDeletePolicy = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdateInternal.SoftDeletePolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SoftDeletePolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SoftDeletePolicy = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type = value; } /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties _property; /// Describes the properties of a Shared Image Gallery. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryProperties()); set => this._property = value; } /// The provisioning state, which only appears in the response. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).ProvisioningState; } + + /// Information of community gallery if current gallery is shared to community. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny SharingProfileCommunityGalleryInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingProfileCommunityGalleryInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingProfileCommunityGalleryInfo = value ?? null /* model class */; } /// A list of sharing profile groups. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] SharingProfileGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SharingProfileGroup; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] SharingProfileGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingProfileGroup; } /// /// This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private** - ///

**Groups** + ///

**Groups**

**Community** ///
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes? SharingProfilePermission { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SharingProfilePermission; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SharingProfilePermission = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes? SharingProfilePermission { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingProfilePermission; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingProfilePermission = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes)""); } + + /// Aggregated sharing state of current gallery. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? SharingStatusAggregatedState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingStatusAggregatedState; } + + /// Summary of all regional sharing status. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[] SharingStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingStatusSummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SharingStatusSummary = value ?? null /* arrayOf */; } /// /// Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public bool? SoftDeletePolicyIsSoftDeleteEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SoftDeletePolicyIsSoftDeleteEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryPropertiesInternal)Property).SoftDeletePolicyIsSoftDeleteEnabled = value ?? default(bool); } + public bool? SoftDeletePolicyIsSoftDeleteEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SoftDeletePolicyIsSoftDeleteEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SoftDeletePolicyIsSoftDeleteEnabled = value ?? default(bool); } /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Tag = value ?? null /* model class */; } /// Resource type [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)__updateResourceDefinition).Type; } /// Creates an new instance. public GalleryUpdate() @@ -115,7 +133,7 @@ public GalleryUpdate() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { @@ -126,7 +144,7 @@ public GalleryUpdate() /// Specifies information about the Shared Image Gallery that you want to update. public partial interface IGalleryUpdate : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinition + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinition { /// /// The description of this Shared Image Gallery resource. This property is updatable. @@ -154,27 +172,51 @@ public partial interface IGalleryUpdate : ReadOnly = true, Description = @"The provisioning state, which only appears in the response.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(string) })] - string ProvisioningState { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; } + /// Information of community gallery if current gallery is shared to community. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Information of community gallery if current gallery is shared to community.", + SerializedName = @"communityGalleryInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny SharingProfileCommunityGalleryInfo { get; set; } /// A list of sharing profile groups. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, ReadOnly = true, Description = @"A list of sharing profile groups.", SerializedName = @"groups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] SharingProfileGroup { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] SharingProfileGroup { get; } /// /// This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private** - ///

**Groups** + ///

**Groups**

**Community** ///
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, ReadOnly = false, - Description = @"This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private**

**Groups**", + Description = @"This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private**

**Groups**

**Community**", SerializedName = @"permissions", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes) })] Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes? SharingProfilePermission { get; set; } + /// Aggregated sharing state of current gallery. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Aggregated sharing state of current gallery.", + SerializedName = @"aggregatedState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? SharingStatusAggregatedState { get; } + /// Summary of all regional sharing status. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Summary of all regional sharing status.", + SerializedName = @"summary", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[] SharingStatusSummary { get; set; } /// /// Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time. /// @@ -189,33 +231,41 @@ public partial interface IGalleryUpdate : } /// Specifies information about the Shared Image Gallery that you want to update. internal partial interface IGalleryUpdateInternal : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal { /// /// The description of this Shared Image Gallery resource. This property is updatable. /// string Description { get; set; } /// Describes the gallery unique name. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryIdentifier Identifier { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryIdentifier Identifier { get; set; } /// /// The unique name of the Shared Image Gallery. This name is generated automatically by Azure. /// string IdentifierUniqueName { get; set; } /// Describes the properties of a Shared Image Gallery. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties Property { get; set; } /// The provisioning state, which only appears in the response. - string ProvisioningState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState? ProvisioningState { get; set; } /// Profile for gallery sharing to subscription or tenant - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile SharingProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile SharingProfile { get; set; } + /// Information of community gallery if current gallery is shared to community. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny SharingProfileCommunityGalleryInfo { get; set; } /// A list of sharing profile groups. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] SharingProfileGroup { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] SharingProfileGroup { get; set; } /// /// This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private** - ///

**Groups** + ///

**Groups**

**Community** ///
Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes? SharingProfilePermission { get; set; } + /// Sharing status of current gallery. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus SharingStatus { get; set; } + /// Aggregated sharing state of current gallery. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? SharingStatusAggregatedState { get; set; } + /// Summary of all regional sharing status. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[] SharingStatusSummary { get; set; } /// Contains information about the soft deletion policy of the gallery. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy SoftDeletePolicy { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy SoftDeletePolicy { get; set; } /// /// Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time. /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryUpdate.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryUpdate.json.cs similarity index 90% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryUpdate.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryUpdate.json.cs index b36db45769b6..11d595f369e5 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/GalleryUpdate.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class GalleryUpdate partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class GalleryUpdate /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class GalleryUpdate /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class GalleryUpdate partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new GalleryUpdate(json) : null; } @@ -75,8 +77,8 @@ internal GalleryUpdate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.J { return; } - __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinition(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryProperties.FromJson(__jsonProperties) : Property;} + __updateResourceDefinition = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinition(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ImagePurchasePlan.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ImagePurchasePlan.PowerShell.cs similarity index 68% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ImagePurchasePlan.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ImagePurchasePlan.PowerShell.cs index 95840a07c47b..4394312f137c 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ImagePurchasePlan.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ImagePurchasePlan.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -33,7 +33,8 @@ public partial class ImagePurchasePlan /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -45,7 +46,8 @@ public partial class ImagePurchasePlan /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -55,27 +57,27 @@ public partial class ImagePurchasePlan partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ImagePurchasePlan(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ImagePurchasePlan(content); } @@ -84,11 +86,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IIma /// Creates a new instance of , deserializing the content from a json string. ///
/// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -101,14 +103,23 @@ internal ImagePurchasePlan(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlanInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlanInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlanInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlanInternal)this).Publisher, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlanInternal)this).Product = (string) content.GetValueForProperty("Product",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlanInternal)this).Product, global::System.Convert.ToString); + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlanInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlanInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Publisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlanInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlanInternal)this).Publisher, global::System.Convert.ToString); + } + if (content.Contains("Product")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlanInternal)this).Product = (string) content.GetValueForProperty("Product",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlanInternal)this).Product, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -121,9 +132,18 @@ internal ImagePurchasePlan(global::System.Management.Automation.PSObject content return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlanInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlanInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlanInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlanInternal)this).Publisher, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlanInternal)this).Product = (string) content.GetValueForProperty("Product",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlanInternal)this).Product, global::System.Convert.ToString); + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlanInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlanInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Publisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlanInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlanInternal)this).Publisher, global::System.Convert.ToString); + } + if (content.Contains("Product")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlanInternal)this).Product = (string) content.GetValueForProperty("Product",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlanInternal)this).Product, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ImagePurchasePlan.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ImagePurchasePlan.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ImagePurchasePlan.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ImagePurchasePlan.TypeConverter.cs index af60ad04f737..825443b8b036 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ImagePurchasePlan.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ImagePurchasePlan.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class ImagePurchasePlanTypeConverter : global::System.Management. { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ImagePurchasePlan.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ImagePurchasePlan.cs similarity index 98% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ImagePurchasePlan.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ImagePurchasePlan.cs index 4de6652131b2..ef8d51f92345 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ImagePurchasePlan.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ImagePurchasePlan.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 /// Describes the gallery image definition purchase plan. This is used by marketplace images. /// public partial class ImagePurchasePlan : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlanInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlanInternal { /// Backing field for property. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ImagePurchasePlan.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ImagePurchasePlan.json.cs similarity index 92% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ImagePurchasePlan.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ImagePurchasePlan.json.cs index 3b4b8ce188f6..5ad91bd23d20 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ImagePurchasePlan.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ImagePurchasePlan.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -22,7 +22,7 @@ public partial class ImagePurchasePlan partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -32,7 +32,8 @@ public partial class ImagePurchasePlan /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -44,7 +45,8 @@ public partial class ImagePurchasePlan /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -54,13 +56,13 @@ public partial class ImagePurchasePlan partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IImagePurchasePlan FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IImagePurchasePlan FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new ImagePurchasePlan(json) : null; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ManagedArtifact.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ManagedArtifact.PowerShell.cs similarity index 80% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ManagedArtifact.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ManagedArtifact.PowerShell.cs index a3c09680e4a1..3ac98be3b149 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ManagedArtifact.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ManagedArtifact.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class ManagedArtifact /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class ManagedArtifact /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class ManagedArtifact partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifact DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifact DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedArtifact(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifact DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifact DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedArtifact(content); } @@ -82,11 +84,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IMan /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifact FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifact FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -99,12 +101,15 @@ internal ManagedArtifact(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifactInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifactInternal)this).Id, global::System.Convert.ToString); + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifactInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifactInternal)this).Id, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -117,7 +122,10 @@ internal ManagedArtifact(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifactInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifactInternal)this).Id, global::System.Convert.ToString); + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifactInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifactInternal)this).Id, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ManagedArtifact.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ManagedArtifact.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ManagedArtifact.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ManagedArtifact.TypeConverter.cs index c483bc7c2495..0814d6a16c2e 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ManagedArtifact.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ManagedArtifact.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class ManagedArtifactTypeConverter : global::System.Management.Au { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifact ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifact ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifact).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifact).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ManagedArtifact.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ManagedArtifact.cs similarity index 96% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ManagedArtifact.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ManagedArtifact.cs index 0c1786797578..bbef11a1cd27 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ManagedArtifact.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ManagedArtifact.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// The managed artifact. public partial class ManagedArtifact : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifact, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifactInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifact, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifactInternal { /// Backing field for property. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ManagedArtifact.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ManagedArtifact.json.cs similarity index 91% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ManagedArtifact.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ManagedArtifact.json.cs index 3956fe6471e0..2ecb9bab855a 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ManagedArtifact.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ManagedArtifact.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class ManagedArtifact partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ManagedArtifact /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class ManagedArtifact /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class ManagedArtifact partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifact. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifact. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifact. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifact. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IManagedArtifact FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IManagedArtifact FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new ManagedArtifact(json) : null; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageEncryption.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageEncryption.PowerShell.cs new file mode 100644 index 000000000000..6055dfd9c980 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageEncryption.PowerShell.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Contains encryption settings for an OS disk image. + [System.ComponentModel.TypeConverter(typeof(OSDiskImageEncryptionTypeConverter))] + public partial class OSDiskImageEncryption + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OSDiskImageEncryption(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OSDiskImageEncryption(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OSDiskImageEncryption(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageSecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("DiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); + } + if (content.Contains("SecurityProfileConfidentialVMEncryptionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal)this).SecurityProfileConfidentialVMEncryptionType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType?) content.GetValueForProperty("SecurityProfileConfidentialVMEncryptionType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal)this).SecurityProfileConfidentialVMEncryptionType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType.CreateFrom); + } + if (content.Contains("SecurityProfileSecureVMDiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal)this).SecurityProfileSecureVMDiskEncryptionSetId = (string) content.GetValueForProperty("SecurityProfileSecureVMDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal)this).SecurityProfileSecureVMDiskEncryptionSetId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OSDiskImageEncryption(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageSecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("DiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); + } + if (content.Contains("SecurityProfileConfidentialVMEncryptionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal)this).SecurityProfileConfidentialVMEncryptionType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType?) content.GetValueForProperty("SecurityProfileConfidentialVMEncryptionType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal)this).SecurityProfileConfidentialVMEncryptionType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType.CreateFrom); + } + if (content.Contains("SecurityProfileSecureVMDiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal)this).SecurityProfileSecureVMDiskEncryptionSetId = (string) content.GetValueForProperty("SecurityProfileSecureVMDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal)this).SecurityProfileSecureVMDiskEncryptionSetId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Contains encryption settings for an OS disk image. + [System.ComponentModel.TypeConverter(typeof(OSDiskImageEncryptionTypeConverter))] + public partial interface IOSDiskImageEncryption + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/OSDiskImageEncryption.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageEncryption.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/OSDiskImageEncryption.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageEncryption.TypeConverter.cs index 75fc3c0584bf..da7af718a2fc 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/OSDiskImageEncryption.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageEncryption.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class OSDiskImageEncryptionTypeConverter : global::System.Managem { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IOSDiskImageEncryption ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IOSDiskImageEncryption).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageEncryption.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageEncryption.cs new file mode 100644 index 000000000000..12b544937183 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageEncryption.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Contains encryption settings for an OS disk image. + public partial class OSDiskImageEncryption : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryption __diskImageEncryption = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DiskImageEncryption(); + + /// A relative URI containing the resource ID of the disk encryption set. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public string DiskEncryptionSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal)__diskImageEncryption).DiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal)__diskImageEncryption).DiskEncryptionSetId = value ?? null; } + + /// Internal Acessors for SecurityProfile + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryptionInternal.SecurityProfile { get => (this._securityProfile = this._securityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageSecurityProfile()); set { {_securityProfile = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile _securityProfile; + + /// This property specifies the security profile of an OS disk image. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile SecurityProfile { get => (this._securityProfile = this._securityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageSecurityProfile()); set => this._securityProfile = value; } + + /// confidential VM encryption types + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType? SecurityProfileConfidentialVMEncryptionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfileInternal)SecurityProfile).ConfidentialVMEncryptionType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfileInternal)SecurityProfile).ConfidentialVMEncryptionType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType)""); } + + /// secure VM disk encryption set id + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string SecurityProfileSecureVMDiskEncryptionSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfileInternal)SecurityProfile).SecureVMDiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfileInternal)SecurityProfile).SecureVMDiskEncryptionSetId = value ?? null; } + + /// Creates an new instance. + public OSDiskImageEncryption() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__diskImageEncryption), __diskImageEncryption); + await eventListener.AssertObjectIsValid(nameof(__diskImageEncryption), __diskImageEncryption); + } + } + /// Contains encryption settings for an OS disk image. + public partial interface IOSDiskImageEncryption : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryption + { + /// confidential VM encryption types + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"confidential VM encryption types", + SerializedName = @"confidentialVMEncryptionType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType? SecurityProfileConfidentialVMEncryptionType { get; set; } + /// secure VM disk encryption set id + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"secure VM disk encryption set id", + SerializedName = @"secureVMDiskEncryptionSetId", + PossibleTypes = new [] { typeof(string) })] + string SecurityProfileSecureVMDiskEncryptionSetId { get; set; } + + } + /// Contains encryption settings for an OS disk image. + internal partial interface IOSDiskImageEncryptionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDiskImageEncryptionInternal + { + /// This property specifies the security profile of an OS disk image. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile SecurityProfile { get; set; } + /// confidential VM encryption types + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType? SecurityProfileConfidentialVMEncryptionType { get; set; } + /// secure VM disk encryption set id + string SecurityProfileSecureVMDiskEncryptionSetId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/OSDiskImageEncryption.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageEncryption.json.cs similarity index 83% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/OSDiskImageEncryption.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageEncryption.json.cs index ffc0fb2db280..c3be2d4c6513 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/OSDiskImageEncryption.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageEncryption.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class OSDiskImageEncryption partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class OSDiskImageEncryption /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class OSDiskImageEncryption /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class OSDiskImageEncryption partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IOSDiskImageEncryption. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IOSDiskImageEncryption. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IOSDiskImageEncryption FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new OSDiskImageEncryption(json) : null; } @@ -75,7 +77,8 @@ internal OSDiskImageEncryption(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtim { return; } - __diskImageEncryption = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.DiskImageEncryption(json); + __diskImageEncryption = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DiskImageEncryption(json); + {_securityProfile = If( json?.PropertyT("securityProfile"), out var __jsonSecurityProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageSecurityProfile.FromJson(__jsonSecurityProfile) : SecurityProfile;} AfterFromJson(json); } @@ -99,6 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode ToJson(M return container; } __diskImageEncryption?.ToJson(container, serializationMode); + AddIf( null != this._securityProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) this._securityProfile.ToJson(null,serializationMode) : null, "securityProfile" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageSecurityProfile.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageSecurityProfile.PowerShell.cs new file mode 100644 index 000000000000..94ed350c6686 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageSecurityProfile.PowerShell.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Contains security profile for an OS disk image. + [System.ComponentModel.TypeConverter(typeof(OSDiskImageSecurityProfileTypeConverter))] + public partial class OSDiskImageSecurityProfile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OSDiskImageSecurityProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OSDiskImageSecurityProfile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OSDiskImageSecurityProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ConfidentialVMEncryptionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfileInternal)this).ConfidentialVMEncryptionType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType?) content.GetValueForProperty("ConfidentialVMEncryptionType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfileInternal)this).ConfidentialVMEncryptionType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType.CreateFrom); + } + if (content.Contains("SecureVMDiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfileInternal)this).SecureVMDiskEncryptionSetId = (string) content.GetValueForProperty("SecureVMDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfileInternal)this).SecureVMDiskEncryptionSetId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OSDiskImageSecurityProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ConfidentialVMEncryptionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfileInternal)this).ConfidentialVMEncryptionType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType?) content.GetValueForProperty("ConfidentialVMEncryptionType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfileInternal)this).ConfidentialVMEncryptionType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType.CreateFrom); + } + if (content.Contains("SecureVMDiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfileInternal)this).SecureVMDiskEncryptionSetId = (string) content.GetValueForProperty("SecureVMDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfileInternal)this).SecureVMDiskEncryptionSetId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Contains security profile for an OS disk image. + [System.ComponentModel.TypeConverter(typeof(OSDiskImageSecurityProfileTypeConverter))] + public partial interface IOSDiskImageSecurityProfile + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageSecurityProfile.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageSecurityProfile.TypeConverter.cs new file mode 100644 index 000000000000..52ef064fce38 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageSecurityProfile.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OSDiskImageSecurityProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OSDiskImageSecurityProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OSDiskImageSecurityProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OSDiskImageSecurityProfile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageSecurityProfile.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageSecurityProfile.cs new file mode 100644 index 000000000000..4649ea152a0d --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageSecurityProfile.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Contains security profile for an OS disk image. + public partial class OSDiskImageSecurityProfile : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfileInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType? _confidentialVMEncryptionType; + + /// confidential VM encryption types + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType? ConfidentialVMEncryptionType { get => this._confidentialVMEncryptionType; set => this._confidentialVMEncryptionType = value; } + + /// Backing field for property. + private string _secureVMDiskEncryptionSetId; + + /// secure VM disk encryption set id + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string SecureVMDiskEncryptionSetId { get => this._secureVMDiskEncryptionSetId; set => this._secureVMDiskEncryptionSetId = value; } + + /// Creates an new instance. + public OSDiskImageSecurityProfile() + { + + } + } + /// Contains security profile for an OS disk image. + public partial interface IOSDiskImageSecurityProfile : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// confidential VM encryption types + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"confidential VM encryption types", + SerializedName = @"confidentialVMEncryptionType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType? ConfidentialVMEncryptionType { get; set; } + /// secure VM disk encryption set id + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"secure VM disk encryption set id", + SerializedName = @"secureVMDiskEncryptionSetId", + PossibleTypes = new [] { typeof(string) })] + string SecureVMDiskEncryptionSetId { get; set; } + + } + /// Contains security profile for an OS disk image. + internal partial interface IOSDiskImageSecurityProfileInternal + + { + /// confidential VM encryption types + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType? ConfidentialVMEncryptionType { get; set; } + /// secure VM disk encryption set id + string SecureVMDiskEncryptionSetId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageSecurityProfile.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageSecurityProfile.json.cs new file mode 100644 index 000000000000..afcee8946eb6 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/OSDiskImageSecurityProfile.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Contains security profile for an OS disk image. + public partial class OSDiskImageSecurityProfile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new OSDiskImageSecurityProfile(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal OSDiskImageSecurityProfile(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_confidentialVMEncryptionType = If( json?.PropertyT("confidentialVMEncryptionType"), out var __jsonConfidentialVMEncryptionType) ? (string)__jsonConfidentialVMEncryptionType : (string)ConfidentialVMEncryptionType;} + {_secureVMDiskEncryptionSetId = If( json?.PropertyT("secureVMDiskEncryptionSetId"), out var __jsonSecureVMDiskEncryptionSetId) ? (string)__jsonSecureVMDiskEncryptionSetId : (string)SecureVMDiskEncryptionSetId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._confidentialVMEncryptionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._confidentialVMEncryptionType.ToString()) : null, "confidentialVMEncryptionType" ,container.Add ); + AddIf( null != (((object)this._secureVMDiskEncryptionSetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._secureVMDiskEncryptionSetId.ToString()) : null, "secureVMDiskEncryptionSetId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RecommendedMachineConfiguration.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RecommendedMachineConfiguration.PowerShell.cs similarity index 51% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RecommendedMachineConfiguration.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RecommendedMachineConfiguration.PowerShell.cs index d7d02472c7bc..1fc537bb1132 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RecommendedMachineConfiguration.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RecommendedMachineConfiguration.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -33,7 +33,8 @@ public partial class RecommendedMachineConfiguration /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -45,7 +46,8 @@ public partial class RecommendedMachineConfiguration /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -55,29 +57,29 @@ public partial class RecommendedMachineConfiguration partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new RecommendedMachineConfiguration(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new RecommendedMachineConfiguration(content); } @@ -86,11 +88,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRec /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -103,17 +105,35 @@ internal RecommendedMachineConfiguration(global::System.Collections.IDictionary return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).VCpUs = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange) content.GetValueForProperty("VCpUs",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).VCpUs, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRangeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).Memory = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange) content.GetValueForProperty("Memory",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).Memory, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRangeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + if (content.Contains("VCpUs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).VCpUs = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange) content.GetValueForProperty("VCpUs",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).VCpUs, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("Memory")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).Memory = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange) content.GetValueForProperty("Memory",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).Memory, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("VCpUsMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VCpUsMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -126,12 +146,30 @@ internal RecommendedMachineConfiguration(global::System.Management.Automation.PS return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).VCpUs = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange) content.GetValueForProperty("VCpUs",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).VCpUs, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRangeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).Memory = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange) content.GetValueForProperty("Memory",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).Memory, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRangeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + if (content.Contains("VCpUs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).VCpUs = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange) content.GetValueForProperty("VCpUs",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).VCpUs, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("Memory")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).Memory = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange) content.GetValueForProperty("Memory",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).Memory, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("VCpUsMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VCpUsMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RecommendedMachineConfiguration.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RecommendedMachineConfiguration.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RecommendedMachineConfiguration.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RecommendedMachineConfiguration.TypeConverter.cs index a264527d3424..352067532dc3 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RecommendedMachineConfiguration.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RecommendedMachineConfiguration.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class RecommendedMachineConfigurationTypeConverter : global::Syst { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,21 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RecommendedMachineConfiguration.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RecommendedMachineConfiguration.cs similarity index 81% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RecommendedMachineConfiguration.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RecommendedMachineConfiguration.cs index ee9e763b4ff8..4b3886b6685d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RecommendedMachineConfiguration.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RecommendedMachineConfiguration.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -11,45 +11,45 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 /// The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. /// public partial class RecommendedMachineConfiguration : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange _memory; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange _memory; /// Describes the resource range. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange Memory { get => (this._memory = this._memory ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRange()); set => this._memory = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange Memory { get => (this._memory = this._memory ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRange()); set => this._memory = value; } /// The maximum number of the resource. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRangeInternal)Memory).Max; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRangeInternal)Memory).Max = value ?? default(int); } + public int? MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRangeInternal)Memory).Max; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRangeInternal)Memory).Max = value ?? default(int); } /// The minimum number of the resource. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRangeInternal)Memory).Min; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRangeInternal)Memory).Min = value ?? default(int); } + public int? MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRangeInternal)Memory).Min; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRangeInternal)Memory).Min = value ?? default(int); } /// Internal Acessors for Memory - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal.Memory { get => (this._memory = this._memory ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRange()); set { {_memory = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal.Memory { get => (this._memory = this._memory ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRange()); set { {_memory = value;} } } /// Internal Acessors for VCpUs - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfigurationInternal.VCpUs { get => (this._vCpUs = this._vCpUs ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRange()); set { {_vCpUs = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfigurationInternal.VCpUs { get => (this._vCpUs = this._vCpUs ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRange()); set { {_vCpUs = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange _vCpUs; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange _vCpUs; /// Describes the resource range. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange VCpUs { get => (this._vCpUs = this._vCpUs ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRange()); set => this._vCpUs = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange VCpUs { get => (this._vCpUs = this._vCpUs ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRange()); set => this._vCpUs = value; } /// The maximum number of the resource. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRangeInternal)VCpUs).Max; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRangeInternal)VCpUs).Max = value ?? default(int); } + public int? VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRangeInternal)VCpUs).Max; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRangeInternal)VCpUs).Max = value ?? default(int); } /// The minimum number of the resource. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public int? VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRangeInternal)VCpUs).Min; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRangeInternal)VCpUs).Min = value ?? default(int); } + public int? VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRangeInternal)VCpUs).Min; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRangeInternal)VCpUs).Min = value ?? default(int); } /// Creates an new instance. public RecommendedMachineConfiguration() @@ -100,13 +100,13 @@ internal partial interface IRecommendedMachineConfigurationInternal { /// Describes the resource range. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange Memory { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange Memory { get; set; } /// The maximum number of the resource. int? MemoryMax { get; set; } /// The minimum number of the resource. int? MemoryMin { get; set; } /// Describes the resource range. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange VCpUs { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange VCpUs { get; set; } /// The maximum number of the resource. int? VCpUsMax { get; set; } /// The minimum number of the resource. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RecommendedMachineConfiguration.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RecommendedMachineConfiguration.json.cs similarity index 90% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RecommendedMachineConfiguration.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RecommendedMachineConfiguration.json.cs index 70429cfa901c..34ababd38d2d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RecommendedMachineConfiguration.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RecommendedMachineConfiguration.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -22,7 +22,7 @@ public partial class RecommendedMachineConfiguration partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -32,7 +32,8 @@ public partial class RecommendedMachineConfiguration /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -44,7 +45,8 @@ public partial class RecommendedMachineConfiguration /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -54,13 +56,13 @@ public partial class RecommendedMachineConfiguration partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRecommendedMachineConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRecommendedMachineConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new RecommendedMachineConfiguration(json) : null; } @@ -77,8 +79,8 @@ internal RecommendedMachineConfiguration(Microsoft.Azure.PowerShell.Cmdlets.Comp { return; } - {_vCpUs = If( json?.PropertyT("vCPUs"), out var __jsonVCpUs) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRange.FromJson(__jsonVCpUs) : VCpUs;} - {_memory = If( json?.PropertyT("memory"), out var __jsonMemory) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ResourceRange.FromJson(__jsonMemory) : Memory;} + {_vCpUs = If( json?.PropertyT("vCPUs"), out var __jsonVCpUs) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRange.FromJson(__jsonVCpUs) : VCpUs;} + {_memory = If( json?.PropertyT("memory"), out var __jsonMemory) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRange.FromJson(__jsonMemory) : Memory;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RegionalReplicationStatus.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalReplicationStatus.PowerShell.cs similarity index 61% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RegionalReplicationStatus.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalReplicationStatus.PowerShell.cs index 3c4c5007d5f9..c0ae9a780cbb 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RegionalReplicationStatus.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalReplicationStatus.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class RegionalReplicationStatus /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class RegionalReplicationStatus /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class RegionalReplicationStatus partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new RegionalReplicationStatus(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new RegionalReplicationStatus(content); } @@ -82,11 +84,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReg /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -99,15 +101,27 @@ internal RegionalReplicationStatus(global::System.Collections.IDictionary conten return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal)this).Region = (string) content.GetValueForProperty("Region",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal)this).Region, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationState?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal)this).Detail = (string) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal)this).Detail, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal)this).Progress = (int?) content.GetValueForProperty("Progress",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal)this).Progress, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + if (content.Contains("Region")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal)this).Region = (string) content.GetValueForProperty("Region",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal)this).Region, global::System.Convert.ToString); + } + if (content.Contains("State")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationState?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationState.CreateFrom); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal)this).Detail = (string) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal)this).Detail, global::System.Convert.ToString); + } + if (content.Contains("Progress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal)this).Progress = (int?) content.GetValueForProperty("Progress",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal)this).Progress, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -120,10 +134,22 @@ internal RegionalReplicationStatus(global::System.Management.Automation.PSObject return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal)this).Region = (string) content.GetValueForProperty("Region",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal)this).Region, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationState?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal)this).Detail = (string) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal)this).Detail, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal)this).Progress = (int?) content.GetValueForProperty("Progress",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal)this).Progress, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + if (content.Contains("Region")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal)this).Region = (string) content.GetValueForProperty("Region",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal)this).Region, global::System.Convert.ToString); + } + if (content.Contains("State")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationState?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationState.CreateFrom); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal)this).Detail = (string) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal)this).Detail, global::System.Convert.ToString); + } + if (content.Contains("Progress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal)this).Progress = (int?) content.GetValueForProperty("Progress",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal)this).Progress, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RegionalReplicationStatus.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalReplicationStatus.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RegionalReplicationStatus.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalReplicationStatus.TypeConverter.cs index e6fb922a5249..2adc08411aaf 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RegionalReplicationStatus.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalReplicationStatus.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class RegionalReplicationStatusTypeConverter : global::System.Man { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RegionalReplicationStatus.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalReplicationStatus.cs similarity index 94% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RegionalReplicationStatus.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalReplicationStatus.cs index e98cfda4e69f..24b616f8fc90 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RegionalReplicationStatus.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalReplicationStatus.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// This is the regional replication status. public partial class RegionalReplicationStatus : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal { /// Backing field for property. @@ -21,16 +21,16 @@ public partial class RegionalReplicationStatus : public string Detail { get => this._detail; } /// Internal Acessors for Detail - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal.Detail { get => this._detail; set { {_detail = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal.Detail { get => this._detail; set { {_detail = value;} } } /// Internal Acessors for Progress - int? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal.Progress { get => this._progress; set { {_progress = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal.Progress { get => this._progress; set { {_progress = value;} } } /// Internal Acessors for Region - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal.Region { get => this._region; set { {_region = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal.Region { get => this._region; set { {_region = value;} } } /// Internal Acessors for State - Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatusInternal.State { get => this._state; set { {_state = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatusInternal.State { get => this._state; set { {_state = value;} } } /// Backing field for property. private int? _progress; diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RegionalReplicationStatus.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalReplicationStatus.json.cs similarity index 93% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RegionalReplicationStatus.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalReplicationStatus.json.cs index 01679d0bfd18..da5bf4877b0a 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/RegionalReplicationStatus.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalReplicationStatus.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class RegionalReplicationStatus partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class RegionalReplicationStatus /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class RegionalReplicationStatus /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class RegionalReplicationStatus partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new RegionalReplicationStatus(json) : null; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalSharingStatus.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalSharingStatus.PowerShell.cs new file mode 100644 index 000000000000..b587c6ce51e1 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalSharingStatus.PowerShell.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Gallery regional sharing status + [System.ComponentModel.TypeConverter(typeof(RegionalSharingStatusTypeConverter))] + public partial class RegionalSharingStatus + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RegionalSharingStatus(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RegionalSharingStatus(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RegionalSharingStatus(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Region")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatusInternal)this).Region = (string) content.GetValueForProperty("Region",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatusInternal)this).Region, global::System.Convert.ToString); + } + if (content.Contains("State")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatusInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatusInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState.CreateFrom); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatusInternal)this).Detail = (string) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatusInternal)this).Detail, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RegionalSharingStatus(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Region")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatusInternal)this).Region = (string) content.GetValueForProperty("Region",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatusInternal)this).Region, global::System.Convert.ToString); + } + if (content.Contains("State")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatusInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatusInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState.CreateFrom); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatusInternal)this).Detail = (string) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatusInternal)this).Detail, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Gallery regional sharing status + [System.ComponentModel.TypeConverter(typeof(RegionalSharingStatusTypeConverter))] + public partial interface IRegionalSharingStatus + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalSharingStatus.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalSharingStatus.TypeConverter.cs new file mode 100644 index 000000000000..b2c34f7b414e --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalSharingStatus.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RegionalSharingStatusTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RegionalSharingStatus.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RegionalSharingStatus.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RegionalSharingStatus.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalSharingStatus.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalSharingStatus.cs new file mode 100644 index 000000000000..87dee0501633 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalSharingStatus.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Gallery regional sharing status + public partial class RegionalSharingStatus : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatusInternal + { + + /// Backing field for property. + private string _detail; + + /// Details of gallery regional sharing failure. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Detail { get => this._detail; set => this._detail = value; } + + /// Internal Acessors for State + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatusInternal.State { get => this._state; set { {_state = value;} } } + + /// Backing field for property. + private string _region; + + /// Region name + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Region { get => this._region; set => this._region = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? _state; + + /// Gallery sharing state in current region + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? State { get => this._state; } + + /// Creates an new instance. + public RegionalSharingStatus() + { + + } + } + /// Gallery regional sharing status + public partial interface IRegionalSharingStatus : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// Details of gallery regional sharing failure. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Details of gallery regional sharing failure.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(string) })] + string Detail { get; set; } + /// Region name + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Region name", + SerializedName = @"region", + PossibleTypes = new [] { typeof(string) })] + string Region { get; set; } + /// Gallery sharing state in current region + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Gallery sharing state in current region", + SerializedName = @"state", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? State { get; } + + } + /// Gallery regional sharing status + internal partial interface IRegionalSharingStatusInternal + + { + /// Details of gallery regional sharing failure. + string Detail { get; set; } + /// Region name + string Region { get; set; } + /// Gallery sharing state in current region + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? State { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalSharingStatus.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalSharingStatus.json.cs new file mode 100644 index 000000000000..1864814324c2 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/RegionalSharingStatus.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Gallery regional sharing status + public partial class RegionalSharingStatus + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new RegionalSharingStatus(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal RegionalSharingStatus(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_region = If( json?.PropertyT("region"), out var __jsonRegion) ? (string)__jsonRegion : (string)Region;} + {_state = If( json?.PropertyT("state"), out var __jsonState) ? (string)__jsonState : (string)State;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? (string)__jsonDetails : (string)Detail;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._region)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._region.ToString()) : null, "region" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._state)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._state.ToString()) : null, "state" ,container.Add ); + } + AddIf( null != (((object)this._detail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._detail.ToString()) : null, "details" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ReplicationStatus.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ReplicationStatus.PowerShell.cs similarity index 67% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ReplicationStatus.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ReplicationStatus.PowerShell.cs index 77e0194df774..361ebcb5e339 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ReplicationStatus.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ReplicationStatus.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class ReplicationStatus /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class ReplicationStatus /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class ReplicationStatus partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ReplicationStatus(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ReplicationStatus(content); } @@ -82,11 +84,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRep /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -99,13 +101,19 @@ internal ReplicationStatus(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)this).AggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("AggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)this).AggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)this).Summary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[]) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)this).Summary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RegionalReplicationStatusTypeConverter.ConvertFrom)); + if (content.Contains("AggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)this).AggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("AggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)this).AggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); + } + if (content.Contains("Summary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)this).Summary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[]) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)this).Summary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalReplicationStatusTypeConverter.ConvertFrom)); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -118,8 +126,14 @@ internal ReplicationStatus(global::System.Management.Automation.PSObject content return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)this).AggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("AggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)this).AggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)this).Summary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[]) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal)this).Summary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RegionalReplicationStatusTypeConverter.ConvertFrom)); + if (content.Contains("AggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)this).AggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState?) content.GetValueForProperty("AggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)this).AggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState.CreateFrom); + } + if (content.Contains("Summary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)this).Summary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[]) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal)this).Summary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalReplicationStatusTypeConverter.ConvertFrom)); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ReplicationStatus.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ReplicationStatus.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ReplicationStatus.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ReplicationStatus.TypeConverter.cs index 847649224a76..3b8d8453af21 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ReplicationStatus.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ReplicationStatus.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class ReplicationStatusTypeConverter : global::System.Management. { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ReplicationStatus.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ReplicationStatus.cs similarity index 88% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ReplicationStatus.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ReplicationStatus.cs index 95971fb745af..0ed489c2ea9d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ReplicationStatus.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ReplicationStatus.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// This is the replication status of the gallery image version. public partial class ReplicationStatus : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal { /// Backing field for property. @@ -23,17 +23,17 @@ public partial class ReplicationStatus : public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? AggregatedState { get => this._aggregatedState; } /// Internal Acessors for AggregatedState - Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal.AggregatedState { get => this._aggregatedState; set { {_aggregatedState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal.AggregatedState { get => this._aggregatedState; set { {_aggregatedState = value;} } } /// Internal Acessors for Summary - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatusInternal.Summary { get => this._summary; set { {_summary = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatusInternal.Summary { get => this._summary; set { {_summary = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] _summary; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] _summary; /// This is a summary of replication status for each region. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] Summary { get => this._summary; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] Summary { get => this._summary; } /// Creates an new instance. public ReplicationStatus() @@ -61,8 +61,8 @@ public partial interface IReplicationStatus : ReadOnly = true, Description = @"This is a summary of replication status for each region.", SerializedName = @"summary", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] Summary { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] Summary { get; } } /// This is the replication status of the gallery image version. @@ -74,7 +74,7 @@ internal partial interface IReplicationStatusInternal /// Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState? AggregatedState { get; set; } /// This is a summary of replication status for each region. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus[] Summary { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] Summary { get; set; } } } \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ReplicationStatus.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ReplicationStatus.json.cs similarity index 90% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ReplicationStatus.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ReplicationStatus.json.cs index 1259dadb3c28..0e977f6cf41b 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ReplicationStatus.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ReplicationStatus.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class ReplicationStatus partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ReplicationStatus /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class ReplicationStatus /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class ReplicationStatus partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IReplicationStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IReplicationStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new ReplicationStatus(json) : null; } @@ -76,7 +78,7 @@ internal ReplicationStatus(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Js return; } {_aggregatedState = If( json?.PropertyT("aggregatedState"), out var __jsonAggregatedState) ? (string)__jsonAggregatedState : (string)AggregatedState;} - {_summary = If( json?.PropertyT("summary"), out var __jsonSummary) ? If( __jsonSummary as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRegionalReplicationStatus) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.RegionalReplicationStatus.FromJson(__u) )) ))() : null : Summary;} + {_summary = If( json?.PropertyT("summary"), out var __jsonSummary) ? If( __jsonSummary as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalReplicationStatus.FromJson(__u) )) ))() : null : Summary;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceRange.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ResourceRange.PowerShell.cs similarity index 73% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceRange.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ResourceRange.PowerShell.cs index 882f2cc00b4f..25618747fc09 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceRange.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ResourceRange.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class ResourceRange /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class ResourceRange /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class ResourceRange partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ResourceRange(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ResourceRange(content); } @@ -82,11 +84,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRes /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -99,13 +101,19 @@ internal ResourceRange(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRangeInternal)this).Min = (int?) content.GetValueForProperty("Min",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRangeInternal)this).Min, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRangeInternal)this).Max = (int?) content.GetValueForProperty("Max",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRangeInternal)this).Max, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + if (content.Contains("Min")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRangeInternal)this).Min = (int?) content.GetValueForProperty("Min",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRangeInternal)this).Min, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Max")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRangeInternal)this).Max = (int?) content.GetValueForProperty("Max",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRangeInternal)this).Max, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -118,8 +126,14 @@ internal ResourceRange(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRangeInternal)this).Min = (int?) content.GetValueForProperty("Min",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRangeInternal)this).Min, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRangeInternal)this).Max = (int?) content.GetValueForProperty("Max",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRangeInternal)this).Max, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + if (content.Contains("Min")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRangeInternal)this).Min = (int?) content.GetValueForProperty("Min",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRangeInternal)this).Min, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Max")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRangeInternal)this).Max = (int?) content.GetValueForProperty("Max",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRangeInternal)this).Max, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceRange.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ResourceRange.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceRange.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ResourceRange.TypeConverter.cs index 7f7fa2edecab..aaf6e8e28a08 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceRange.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ResourceRange.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class ResourceRangeTypeConverter : global::System.Management.Auto { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceRange.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ResourceRange.cs similarity index 97% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceRange.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ResourceRange.cs index 7d2e195c4deb..4bb3e5122e43 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceRange.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ResourceRange.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// Describes the resource range. public partial class ResourceRange : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRangeInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRangeInternal { /// Backing field for property. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceRange.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ResourceRange.json.cs similarity index 92% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceRange.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ResourceRange.json.cs index acef865a3d73..40eef2e10ee9 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/ResourceRange.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/ResourceRange.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class ResourceRange partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ResourceRange /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class ResourceRange /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class ResourceRange partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceRange FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new ResourceRange(json) : null; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfile.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfile.PowerShell.cs similarity index 61% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfile.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfile.PowerShell.cs index e8c9cf381a3a..737393c41a51 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfile.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfile.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class SharingProfile /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class SharingProfile /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class SharingProfile partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SharingProfile(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SharingProfile(content); } @@ -82,11 +84,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISha /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -99,13 +101,23 @@ internal SharingProfile(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileInternal)this).Permission = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes?) content.GetValueForProperty("Permission",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileInternal)this).Permission, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileInternal)this).Group = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[]) content.GetValueForProperty("Group",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileInternal)this).Group, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfileGroupTypeConverter.ConvertFrom)); + if (content.Contains("Permission")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal)this).Permission = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes?) content.GetValueForProperty("Permission",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal)this).Permission, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes.CreateFrom); + } + if (content.Contains("Group")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal)this).Group = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[]) content.GetValueForProperty("Group",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal)this).Group, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfileGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("CommunityGalleryInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal)this).CommunityGalleryInfo = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny) content.GetValueForProperty("CommunityGalleryInfo",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal)this).CommunityGalleryInfo, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.AnyTypeConverter.ConvertFrom); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -118,8 +130,18 @@ internal SharingProfile(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileInternal)this).Permission = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes?) content.GetValueForProperty("Permission",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileInternal)this).Permission, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileInternal)this).Group = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[]) content.GetValueForProperty("Group",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileInternal)this).Group, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfileGroupTypeConverter.ConvertFrom)); + if (content.Contains("Permission")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal)this).Permission = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes?) content.GetValueForProperty("Permission",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal)this).Permission, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes.CreateFrom); + } + if (content.Contains("Group")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal)this).Group = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[]) content.GetValueForProperty("Group",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal)this).Group, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfileGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("CommunityGalleryInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal)this).CommunityGalleryInfo = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny) content.GetValueForProperty("CommunityGalleryInfo",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal)this).CommunityGalleryInfo, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.AnyTypeConverter.ConvertFrom); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfile.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfile.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfile.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfile.TypeConverter.cs index a3a65f4124c2..05dd11b4bebe 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfile.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class SharingProfileTypeConverter : global::System.Management.Aut { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfile.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfile.cs similarity index 64% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfile.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfile.cs index 44d764abee67..54638ee6ef9e 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfile.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfile.cs @@ -3,32 +3,39 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// Profile for gallery sharing to subscription or tenant public partial class SharingProfile : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal { + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny _communityGalleryInfo; + + /// Information of community gallery if current gallery is shared to community. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny CommunityGalleryInfo { get => (this._communityGalleryInfo = this._communityGalleryInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Any()); set => this._communityGalleryInfo = value; } + /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] _group; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] _group; /// A list of sharing profile groups. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] Group { get => this._group; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] Group { get => this._group; } /// Internal Acessors for Group - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileInternal.Group { get => this._group; set { {_group = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileInternal.Group { get => this._group; set { {_group = value;} } } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes? _permission; /// /// This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private** - ///

**Groups** + ///

**Groups**

**Community** ///
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes? Permission { get => this._permission; set => this._permission = value; } @@ -43,22 +50,30 @@ public SharingProfile() public partial interface ISharingProfile : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable { + /// Information of community gallery if current gallery is shared to community. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Information of community gallery if current gallery is shared to community.", + SerializedName = @"communityGalleryInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny CommunityGalleryInfo { get; set; } /// A list of sharing profile groups. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, ReadOnly = true, Description = @"A list of sharing profile groups.", SerializedName = @"groups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] Group { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] Group { get; } /// /// This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private** - ///

**Groups** + ///

**Groups**

**Community** ///
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, ReadOnly = false, - Description = @"This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private**

**Groups**", + Description = @"This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private**

**Groups**

**Community**", SerializedName = @"permissions", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes) })] Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes? Permission { get; set; } @@ -68,11 +83,13 @@ public partial interface ISharingProfile : internal partial interface ISharingProfileInternal { + /// Information of community gallery if current gallery is shared to community. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny CommunityGalleryInfo { get; set; } /// A list of sharing profile groups. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] Group { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] Group { get; set; } /// /// This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private** - ///

**Groups** + ///

**Groups**

**Community** ///
Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes? Permission { get; set; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfile.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfile.json.cs similarity index 85% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfile.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfile.json.cs index f053a048f0eb..c001f769d518 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfile.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class SharingProfile partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class SharingProfile /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class SharingProfile /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class SharingProfile partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new SharingProfile(json) : null; } @@ -76,7 +78,8 @@ internal SharingProfile(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json. return; } {_permission = If( json?.PropertyT("permissions"), out var __jsonPermissions) ? (string)__jsonPermissions : (string)Permission;} - {_group = If( json?.PropertyT("groups"), out var __jsonGroups) ? If( __jsonGroups as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfileGroup.FromJson(__u) )) ))() : null : Group;} + {_group = If( json?.PropertyT("groups"), out var __jsonGroups) ? If( __jsonGroups as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfileGroup.FromJson(__u) )) ))() : null : Group;} + {_communityGalleryInfo = If( json?.PropertyT("communityGalleryInfo"), out var __jsonCommunityGalleryInfo) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Any.FromJson(__jsonCommunityGalleryInfo) : CommunityGalleryInfo;} AfterFromJson(json); } @@ -112,6 +115,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode ToJson(M container.Add("groups",__w); } } + AddIf( null != this._communityGalleryInfo ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) this._communityGalleryInfo.ToJson(null,serializationMode) : null, "communityGalleryInfo" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfileGroup.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfileGroup.PowerShell.cs similarity index 71% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfileGroup.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfileGroup.PowerShell.cs index 580c63d4e1b8..edf73dd76107 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfileGroup.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfileGroup.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class SharingProfileGroup /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class SharingProfileGroup /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class SharingProfileGroup partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SharingProfileGroup(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SharingProfileGroup(content); } @@ -82,11 +84,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISha /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -99,13 +101,19 @@ internal SharingProfileGroup(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroupInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingProfileGroupTypes?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroupInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingProfileGroupTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroupInternal)this).Id = (string[]) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroupInternal)this).Id, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroupInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingProfileGroupTypes?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroupInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingProfileGroupTypes.CreateFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroupInternal)this).Id = (string[]) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroupInternal)this).Id, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -118,8 +126,14 @@ internal SharingProfileGroup(global::System.Management.Automation.PSObject conte return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroupInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingProfileGroupTypes?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroupInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingProfileGroupTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroupInternal)this).Id = (string[]) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroupInternal)this).Id, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroupInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingProfileGroupTypes?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroupInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingProfileGroupTypes.CreateFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroupInternal)this).Id = (string[]) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroupInternal)this).Id, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfileGroup.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfileGroup.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfileGroup.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfileGroup.TypeConverter.cs index 66f9c2590f03..ccb24e8777b9 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfileGroup.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfileGroup.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class SharingProfileGroupTypeConverter : global::System.Managemen { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfileGroup.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfileGroup.cs similarity index 98% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfileGroup.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfileGroup.cs index 598503b040fe..d0e82ab17bbe 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfileGroup.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfileGroup.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// Group of the gallery sharing profile public partial class SharingProfileGroup : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroupInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroupInternal { /// Backing field for property. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfileGroup.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfileGroup.json.cs similarity index 92% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfileGroup.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfileGroup.json.cs index 88ad83e19e99..18dfc3362f8b 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingProfileGroup.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingProfileGroup.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class SharingProfileGroup partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class SharingProfileGroup /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class SharingProfileGroup /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class SharingProfileGroup partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new SharingProfileGroup(json) : null; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingStatus.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingStatus.PowerShell.cs new file mode 100644 index 000000000000..7e9c07c69682 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingStatus.PowerShell.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Sharing status of current gallery. + [System.ComponentModel.TypeConverter(typeof(SharingStatusTypeConverter))] + public partial class SharingStatus + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SharingStatus(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SharingStatus(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SharingStatus(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatusInternal)this).AggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState?) content.GetValueForProperty("AggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatusInternal)this).AggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState.CreateFrom); + } + if (content.Contains("Summary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatusInternal)this).Summary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[]) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatusInternal)this).Summary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalSharingStatusTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SharingStatus(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AggregatedState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatusInternal)this).AggregatedState = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState?) content.GetValueForProperty("AggregatedState",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatusInternal)this).AggregatedState, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState.CreateFrom); + } + if (content.Contains("Summary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatusInternal)this).Summary = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[]) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatusInternal)this).Summary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalSharingStatusTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Sharing status of current gallery. + [System.ComponentModel.TypeConverter(typeof(SharingStatusTypeConverter))] + public partial interface ISharingStatus + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingStatus.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingStatus.TypeConverter.cs new file mode 100644 index 000000000000..15be233428d0 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingStatus.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SharingStatusTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SharingStatus.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SharingStatus.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SharingStatus.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingStatus.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingStatus.cs new file mode 100644 index 000000000000..52cbce5840e0 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingStatus.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Sharing status of current gallery. + public partial class SharingStatus : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatusInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? _aggregatedState; + + /// Aggregated sharing state of current gallery. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? AggregatedState { get => this._aggregatedState; } + + /// Internal Acessors for AggregatedState + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatusInternal.AggregatedState { get => this._aggregatedState; set { {_aggregatedState = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[] _summary; + + /// Summary of all regional sharing status. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[] Summary { get => this._summary; set => this._summary = value; } + + /// Creates an new instance. + public SharingStatus() + { + + } + } + /// Sharing status of current gallery. + public partial interface ISharingStatus : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// Aggregated sharing state of current gallery. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Aggregated sharing state of current gallery.", + SerializedName = @"aggregatedState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? AggregatedState { get; } + /// Summary of all regional sharing status. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Summary of all regional sharing status.", + SerializedName = @"summary", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[] Summary { get; set; } + + } + /// Sharing status of current gallery. + internal partial interface ISharingStatusInternal + + { + /// Aggregated sharing state of current gallery. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState? AggregatedState { get; set; } + /// Summary of all regional sharing status. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus[] Summary { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingStatus.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingStatus.json.cs new file mode 100644 index 000000000000..c73ef4e6373e --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingStatus.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Sharing status of current gallery. + public partial class SharingStatus + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new SharingStatus(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal SharingStatus(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_aggregatedState = If( json?.PropertyT("aggregatedState"), out var __jsonAggregatedState) ? (string)__jsonAggregatedState : (string)AggregatedState;} + {_summary = If( json?.PropertyT("summary"), out var __jsonSummary) ? If( __jsonSummary as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalSharingStatus) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.RegionalSharingStatus.FromJson(__u) )) ))() : null : Summary;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._aggregatedState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._aggregatedState.ToString()) : null, "aggregatedState" ,container.Add ); + } + if (null != this._summary) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.XNodeArray(); + foreach( var __x in this._summary ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("summary",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingUpdate.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingUpdate.PowerShell.cs similarity index 67% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingUpdate.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingUpdate.PowerShell.cs index f0e2baca565d..a95723b4313e 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingUpdate.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingUpdate.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class SharingUpdate /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class SharingUpdate /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class SharingUpdate partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SharingUpdate(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SharingUpdate(content); } @@ -82,11 +84,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISha /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -99,13 +101,19 @@ internal SharingUpdate(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdateInternal)this).OperationType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingUpdateOperationTypes) content.GetValueForProperty("OperationType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdateInternal)this).OperationType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingUpdateOperationTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdateInternal)this).Group = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[]) content.GetValueForProperty("Group",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdateInternal)this).Group, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfileGroupTypeConverter.ConvertFrom)); + if (content.Contains("OperationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdateInternal)this).OperationType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingUpdateOperationTypes) content.GetValueForProperty("OperationType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdateInternal)this).OperationType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingUpdateOperationTypes.CreateFrom); + } + if (content.Contains("Group")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdateInternal)this).Group = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[]) content.GetValueForProperty("Group",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdateInternal)this).Group, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfileGroupTypeConverter.ConvertFrom)); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -118,8 +126,14 @@ internal SharingUpdate(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdateInternal)this).OperationType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingUpdateOperationTypes) content.GetValueForProperty("OperationType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdateInternal)this).OperationType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingUpdateOperationTypes.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdateInternal)this).Group = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[]) content.GetValueForProperty("Group",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdateInternal)this).Group, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfileGroupTypeConverter.ConvertFrom)); + if (content.Contains("OperationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdateInternal)this).OperationType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingUpdateOperationTypes) content.GetValueForProperty("OperationType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdateInternal)this).OperationType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingUpdateOperationTypes.CreateFrom); + } + if (content.Contains("Group")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdateInternal)this).Group = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[]) content.GetValueForProperty("Group",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdateInternal)this).Group, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfileGroupTypeConverter.ConvertFrom)); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingUpdate.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingUpdate.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingUpdate.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingUpdate.TypeConverter.cs index 9759e3f3f614..0e1796ad7280 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingUpdate.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class SharingUpdateTypeConverter : global::System.Management.Auto { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingUpdate.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingUpdate.cs similarity index 92% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingUpdate.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingUpdate.cs index 48c485fd8f2a..161128486bd8 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingUpdate.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingUpdate.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// Specifies information about the gallery sharing profile update. public partial class SharingUpdate : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdate, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdateInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdateInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] _group; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] _group; /// A list of sharing profile groups. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] Group { get => this._group; set => this._group = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] Group { get => this._group; set => this._group = value; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingUpdateOperationTypes _operationType; @@ -46,8 +46,8 @@ public partial interface ISharingUpdate : ReadOnly = false, Description = @"A list of sharing profile groups.", SerializedName = @"groups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] Group { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] Group { get; set; } /// /// This property allows you to specify the operation type of gallery sharing update.

Possible values are:

/// **Add**

**Remove**

**Reset** @@ -66,7 +66,7 @@ internal partial interface ISharingUpdateInternal { /// A list of sharing profile groups. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup[] Group { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup[] Group { get; set; } /// /// This property allows you to specify the operation type of gallery sharing update.

Possible values are:

/// **Add**

**Remove**

**Reset** diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingUpdate.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingUpdate.json.cs similarity index 90% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingUpdate.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingUpdate.json.cs index cae443776821..907749467366 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SharingUpdate.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SharingUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class SharingUpdate partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class SharingUpdate /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class SharingUpdate /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class SharingUpdate partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new SharingUpdate(json) : null; } @@ -76,7 +78,7 @@ internal SharingUpdate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.J return; } {_operationType = If( json?.PropertyT("operationType"), out var __jsonOperationType) ? (string)__jsonOperationType : (string)OperationType;} - {_group = If( json?.PropertyT("groups"), out var __jsonGroups) ? If( __jsonGroups as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISharingProfileGroup) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.SharingProfileGroup.FromJson(__u) )) ))() : null : Group;} + {_group = If( json?.PropertyT("groups"), out var __jsonGroups) ? If( __jsonGroups as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingProfileGroup) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingProfileGroup.FromJson(__u) )) ))() : null : Group;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SoftDeletePolicy.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SoftDeletePolicy.PowerShell.cs similarity index 79% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SoftDeletePolicy.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SoftDeletePolicy.PowerShell.cs index e10fcead3e63..2c376eb7140d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SoftDeletePolicy.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SoftDeletePolicy.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class SoftDeletePolicy /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class SoftDeletePolicy /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class SoftDeletePolicy partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SoftDeletePolicy(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SoftDeletePolicy(content); } @@ -82,11 +84,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISof /// Creates a new instance of , deserializing the content from a json string. ///
/// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -99,12 +101,15 @@ internal SoftDeletePolicy(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicyInternal)this).IsSoftDeleteEnabled = (bool?) content.GetValueForProperty("IsSoftDeleteEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicyInternal)this).IsSoftDeleteEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + if (content.Contains("IsSoftDeleteEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicyInternal)this).IsSoftDeleteEnabled = (bool?) content.GetValueForProperty("IsSoftDeleteEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicyInternal)this).IsSoftDeleteEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -117,7 +122,10 @@ internal SoftDeletePolicy(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicyInternal)this).IsSoftDeleteEnabled = (bool?) content.GetValueForProperty("IsSoftDeleteEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicyInternal)this).IsSoftDeleteEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + if (content.Contains("IsSoftDeleteEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicyInternal)this).IsSoftDeleteEnabled = (bool?) content.GetValueForProperty("IsSoftDeleteEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicyInternal)this).IsSoftDeleteEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SoftDeletePolicy.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SoftDeletePolicy.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SoftDeletePolicy.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SoftDeletePolicy.TypeConverter.cs index b2fba1c4e811..e61f6cfd3749 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SoftDeletePolicy.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SoftDeletePolicy.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class SoftDeletePolicyTypeConverter : global::System.Management.A { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SoftDeletePolicy.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SoftDeletePolicy.cs similarity index 97% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SoftDeletePolicy.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SoftDeletePolicy.cs index 181d74f73359..b91bcf148f6f 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SoftDeletePolicy.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SoftDeletePolicy.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// Contains information about the soft deletion policy of the gallery. public partial class SoftDeletePolicy : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicyInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicyInternal { /// Backing field for property. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SoftDeletePolicy.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SoftDeletePolicy.json.cs similarity index 91% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SoftDeletePolicy.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SoftDeletePolicy.json.cs index 4291c9d89e77..1936c626c460 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/SoftDeletePolicy.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/SoftDeletePolicy.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class SoftDeletePolicy partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class SoftDeletePolicy /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class SoftDeletePolicy /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class SoftDeletePolicy partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ISoftDeletePolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new SoftDeletePolicy(json) : null; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/TargetRegion.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/TargetRegion.PowerShell.cs new file mode 100644 index 000000000000..e59f602fa225 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/TargetRegion.PowerShell.cs @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Describes the target region information. + [System.ComponentModel.TypeConverter(typeof(TargetRegionTypeConverter))] + public partial class TargetRegion + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TargetRegion(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TargetRegion(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TargetRegion(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.EncryptionImagesTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("RegionalReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).RegionalReplicaCount = (int?) content.GetValueForProperty("RegionalReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).RegionalReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).StorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("StorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).StorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("EncryptionOSDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).EncryptionOSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption) content.GetValueForProperty("EncryptionOSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).EncryptionOSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageEncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("EncryptionDataDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).EncryptionDataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption[]) content.GetValueForProperty("EncryptionDataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).EncryptionDataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DataDiskImageEncryptionTypeConverter.ConvertFrom)); + } + if (content.Contains("OSDiskImageDiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).OSDiskImageDiskEncryptionSetId = (string) content.GetValueForProperty("OSDiskImageDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).OSDiskImageDiskEncryptionSetId, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).OSDiskImageSecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile) content.GetValueForProperty("OSDiskImageSecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).OSDiskImageSecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageSecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfileConfidentialVMEncryptionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).SecurityProfileConfidentialVMEncryptionType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType?) content.GetValueForProperty("SecurityProfileConfidentialVMEncryptionType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).SecurityProfileConfidentialVMEncryptionType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType.CreateFrom); + } + if (content.Contains("SecurityProfileSecureVMDiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).SecurityProfileSecureVMDiskEncryptionSetId = (string) content.GetValueForProperty("SecurityProfileSecureVMDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).SecurityProfileSecureVMDiskEncryptionSetId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TargetRegion(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.EncryptionImagesTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("RegionalReplicaCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).RegionalReplicaCount = (int?) content.GetValueForProperty("RegionalReplicaCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).RegionalReplicaCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageAccountType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).StorageAccountType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType?) content.GetValueForProperty("StorageAccountType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).StorageAccountType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType.CreateFrom); + } + if (content.Contains("EncryptionOSDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).EncryptionOSDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption) content.GetValueForProperty("EncryptionOSDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).EncryptionOSDiskImage, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageEncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("EncryptionDataDiskImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).EncryptionDataDiskImage = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption[]) content.GetValueForProperty("EncryptionDataDiskImage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).EncryptionDataDiskImage, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.DataDiskImageEncryptionTypeConverter.ConvertFrom)); + } + if (content.Contains("OSDiskImageDiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).OSDiskImageDiskEncryptionSetId = (string) content.GetValueForProperty("OSDiskImageDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).OSDiskImageDiskEncryptionSetId, global::System.Convert.ToString); + } + if (content.Contains("OSDiskImageSecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).OSDiskImageSecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile) content.GetValueForProperty("OSDiskImageSecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).OSDiskImageSecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.OSDiskImageSecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfileConfidentialVMEncryptionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).SecurityProfileConfidentialVMEncryptionType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType?) content.GetValueForProperty("SecurityProfileConfidentialVMEncryptionType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).SecurityProfileConfidentialVMEncryptionType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType.CreateFrom); + } + if (content.Contains("SecurityProfileSecureVMDiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).SecurityProfileSecureVMDiskEncryptionSetId = (string) content.GetValueForProperty("SecurityProfileSecureVMDiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal)this).SecurityProfileSecureVMDiskEncryptionSetId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Describes the target region information. + [System.ComponentModel.TypeConverter(typeof(TargetRegionTypeConverter))] + public partial interface ITargetRegion + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/TargetRegion.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/TargetRegion.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/TargetRegion.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/TargetRegion.TypeConverter.cs index 6c843a014544..dc5f9d7760b4 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/TargetRegion.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/TargetRegion.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class TargetRegionTypeConverter : global::System.Management.Autom { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/TargetRegion.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/TargetRegion.cs similarity index 61% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/TargetRegion.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/TargetRegion.cs index 9bc1b92bae9e..7e9e1d602f64 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/TargetRegion.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/TargetRegion.cs @@ -3,34 +3,37 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// Describes the target region information. public partial class TargetRegion : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImages _encryption; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages _encryption; /// /// Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. /// [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImages Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.EncryptionImages()); set => this._encryption = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.EncryptionImages()); set => this._encryption = value; } /// A list of encryption specifications for data disk images. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption[] EncryptionDataDiskImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal)Encryption).DataDiskImage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal)Encryption).DataDiskImage = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption[] EncryptionDataDiskImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).DataDiskImage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).DataDiskImage = value ?? null /* arrayOf */; } /// Internal Acessors for Encryption - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImages Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal.Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.EncryptionImages()); set { {_encryption = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal.Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.EncryptionImages()); set { {_encryption = value;} } } /// Internal Acessors for EncryptionOSDiskImage - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegionInternal.EncryptionOSDiskImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal)Encryption).OSDiskImage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal)Encryption).OSDiskImage = value; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal.EncryptionOSDiskImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).OSDiskImage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).OSDiskImage = value; } + + /// Internal Acessors for OSDiskImageSecurityProfile + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegionInternal.OSDiskImageSecurityProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).OSDiskImageSecurityProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).OSDiskImageSecurityProfile = value; } /// Backing field for property. private string _name; @@ -41,7 +44,7 @@ public partial class TargetRegion : /// A relative URI containing the resource ID of the disk encryption set. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] - public string OSDiskImageDiskEncryptionSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal)Encryption).OSDiskImageDiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImagesInternal)Encryption).OSDiskImageDiskEncryptionSetId = value ?? null; } + public string OSDiskImageDiskEncryptionSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).OSDiskImageDiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).OSDiskImageDiskEncryptionSetId = value ?? null; } /// Backing field for property. private int? _regionalReplicaCount; @@ -52,6 +55,14 @@ public partial class TargetRegion : [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] public int? RegionalReplicaCount { get => this._regionalReplicaCount; set => this._regionalReplicaCount = value; } + /// confidential VM encryption types + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType? SecurityProfileConfidentialVMEncryptionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).SecurityProfileConfidentialVMEncryptionType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).SecurityProfileConfidentialVMEncryptionType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType)""); } + + /// secure VM disk encryption set id + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string SecurityProfileSecureVMDiskEncryptionSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).SecurityProfileSecureVMDiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImagesInternal)Encryption).SecurityProfileSecureVMDiskEncryptionSetId = value ?? null; } + /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType? _storageAccountType; @@ -77,8 +88,8 @@ public partial interface ITargetRegion : ReadOnly = false, Description = @"A list of encryption specifications for data disk images.", SerializedName = @"dataDiskImages", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption[] EncryptionDataDiskImage { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption[] EncryptionDataDiskImage { get; set; } /// The name of the region. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = true, @@ -105,6 +116,22 @@ public partial interface ITargetRegion : SerializedName = @"regionalReplicaCount", PossibleTypes = new [] { typeof(int) })] int? RegionalReplicaCount { get; set; } + /// confidential VM encryption types + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"confidential VM encryption types", + SerializedName = @"confidentialVMEncryptionType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType? SecurityProfileConfidentialVMEncryptionType { get; set; } + /// secure VM disk encryption set id + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"secure VM disk encryption set id", + SerializedName = @"secureVMDiskEncryptionSetId", + PossibleTypes = new [] { typeof(string) })] + string SecurityProfileSecureVMDiskEncryptionSetId { get; set; } /// /// Specifies the storage account type to be used to store the image. This property is not updatable. /// @@ -124,19 +151,25 @@ internal partial interface ITargetRegionInternal /// /// Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. /// - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IEncryptionImages Encryption { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IEncryptionImages Encryption { get; set; } /// A list of encryption specifications for data disk images. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDataDiskImageEncryption[] EncryptionDataDiskImage { get; set; } - /// This is the disk image encryption base class. - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IDiskImageEncryption EncryptionOSDiskImage { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDataDiskImageEncryption[] EncryptionDataDiskImage { get; set; } + /// Contains encryption settings for an OS disk image. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageEncryption EncryptionOSDiskImage { get; set; } /// The name of the region. string Name { get; set; } /// A relative URI containing the resource ID of the disk encryption set. string OSDiskImageDiskEncryptionSetId { get; set; } + /// This property specifies the security profile of an OS disk image. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IOSDiskImageSecurityProfile OSDiskImageSecurityProfile { get; set; } /// /// The number of replicas of the Image Version to be created per region. This property is updatable. /// int? RegionalReplicaCount { get; set; } + /// confidential VM encryption types + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType? SecurityProfileConfidentialVMEncryptionType { get; set; } + /// secure VM disk encryption set id + string SecurityProfileSecureVMDiskEncryptionSetId { get; set; } /// /// Specifies the storage account type to be used to store the image. This property is not updatable. /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/TargetRegion.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/TargetRegion.json.cs similarity index 92% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/TargetRegion.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/TargetRegion.json.cs index 94aac4b8e083..4e4daf492718 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/TargetRegion.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/TargetRegion.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class TargetRegion partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class TargetRegion /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class TargetRegion /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class TargetRegion partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new TargetRegion(json) : null; } @@ -75,7 +77,7 @@ internal TargetRegion(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.Js { return; } - {_encryption = If( json?.PropertyT("encryption"), out var __jsonEncryption) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.EncryptionImages.FromJson(__jsonEncryption) : Encryption;} + {_encryption = If( json?.PropertyT("encryption"), out var __jsonEncryption) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.EncryptionImages.FromJson(__jsonEncryption) : Encryption;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} {_regionalReplicaCount = If( json?.PropertyT("regionalReplicaCount"), out var __jsonRegionalReplicaCount) ? (int?)__jsonRegionalReplicaCount : RegionalReplicaCount;} {_storageAccountType = If( json?.PropertyT("storageAccountType"), out var __jsonStorageAccountType) ? (string)__jsonStorageAccountType : (string)StorageAccountType;} diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinition.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinition.PowerShell.cs similarity index 61% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinition.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinition.PowerShell.cs index 256cb5c61c8e..4f53a847abc0 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinition.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinition.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class UpdateResourceDefinition /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class UpdateResourceDefinition /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class UpdateResourceDefinition partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UpdateResourceDefinition(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UpdateResourceDefinition(content); } @@ -82,8 +84,8 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpd /// Creates a new instance of , deserializing the content from a json string. ///
/// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -91,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpd public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,15 +106,27 @@ internal UpdateResourceDefinition(global::System.Collections.IDictionary content return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -125,10 +139,22 @@ internal UpdateResourceDefinition(global::System.Management.Automation.PSObject return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinitionTagsTypeConverter.ConvertFrom); + } AfterDeserializePSObject(content); } } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinition.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinition.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinition.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinition.TypeConverter.cs index b2e0387f3f78..4b1d1fbd9674 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinition.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class UpdateResourceDefinitionTypeConverter : global::System.Mana { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinition.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinition.cs similarity index 88% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinition.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinition.cs index b988e77741ba..82ab1284e20e 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinition.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinition.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// The Update Resource model definition. public partial class UpdateResourceDefinition : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinition, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinition, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal { /// Backing field for property. @@ -21,13 +21,13 @@ public partial class UpdateResourceDefinition : public string Id { get => this._id; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _name; @@ -37,11 +37,11 @@ public partial class UpdateResourceDefinition : public string Name { get => this._name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags _tag; + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags _tag; /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinitionTags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinitionTags()); set => this._tag = value; } /// Backing field for property. private string _type; @@ -82,8 +82,8 @@ public partial interface IUpdateResourceDefinition : ReadOnly = false, Description = @"Resource tags", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags) })] - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags Tag { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags Tag { get; set; } /// Resource type [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, @@ -103,7 +103,7 @@ internal partial interface IUpdateResourceDefinitionInternal /// Resource name string Name { get; set; } /// Resource tags - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags Tag { get; set; } /// Resource type string Type { get; set; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinition.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinition.json.cs similarity index 92% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinition.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinition.json.cs index e466e4b1fa0d..8ad5fa7f2654 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinition.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class UpdateResourceDefinition partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class UpdateResourceDefinition /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class UpdateResourceDefinition /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class UpdateResourceDefinition partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new UpdateResourceDefinition(json) : null; } @@ -114,7 +116,7 @@ internal UpdateResourceDefinition(Microsoft.Azure.PowerShell.Cmdlets.Compute.Run {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinitionTags.FromJson(__jsonTags) : Tag;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinitionTags.FromJson(__jsonTags) : Tag;} AfterFromJson(json); } } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinitionTags.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinitionTags.PowerShell.cs similarity index 88% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinitionTags.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinitionTags.PowerShell.cs index 3d983b7c4662..41121e378623 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinitionTags.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinitionTags.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class UpdateResourceDefinitionTags /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class UpdateResourceDefinitionTags /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,29 +55,29 @@ public partial class UpdateResourceDefinitionTags partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UpdateResourceDefinitionTags(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UpdateResourceDefinitionTags(content); } @@ -84,8 +86,8 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpd /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -93,7 +95,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpd public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -112,7 +114,7 @@ internal UpdateResourceDefinitionTags(global::System.Collections.IDictionary con } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinitionTags.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinitionTags.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinitionTags.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinitionTags.TypeConverter.cs index 219166cf2673..13294d66a335 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinitionTags.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinitionTags.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class UpdateResourceDefinitionTagsTypeConverter : global::System. { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinitionTags.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinitionTags.cs similarity index 93% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinitionTags.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinitionTags.cs index d8061ac87e73..80e064b583dc 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinitionTags.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinitionTags.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// Resource tags public partial class UpdateResourceDefinitionTags : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTagsInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTagsInternal { /// Creates an new instance. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinitionTags.dictionary.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinitionTags.dictionary.cs similarity index 98% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinitionTags.dictionary.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinitionTags.dictionary.cs index db7f399324cf..46ea8b5e05b2 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinitionTags.dictionary.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinitionTags.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.UpdateResourceDefinitionTags source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.UpdateResourceDefinitionTags source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinitionTags.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinitionTags.json.cs similarity index 91% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinitionTags.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinitionTags.json.cs index ffdc518e603c..73bbf32ce0c6 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UpdateResourceDefinitionTags.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UpdateResourceDefinitionTags.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class UpdateResourceDefinitionTags partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class UpdateResourceDefinitionTags /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class UpdateResourceDefinitionTags /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class UpdateResourceDefinitionTags partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new UpdateResourceDefinitionTags(json) : null; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactManage.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactManage.PowerShell.cs similarity index 67% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactManage.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactManage.PowerShell.cs index ff2edd90dba0..f71164f142fc 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactManage.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactManage.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -30,7 +30,8 @@ public partial class UserArtifactManage /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -42,7 +43,8 @@ public partial class UserArtifactManage /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -52,27 +54,27 @@ public partial class UserArtifactManage partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UserArtifactManage(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UserArtifactManage(content); } @@ -81,8 +83,8 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUse /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUse public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -103,14 +105,23 @@ internal UserArtifactManage(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManageInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManageInternal)this).Install, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManageInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManageInternal)this).Remove, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManageInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManageInternal)this).Update, global::System.Convert.ToString); + if (content.Contains("Install")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManageInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManageInternal)this).Install, global::System.Convert.ToString); + } + if (content.Contains("Remove")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManageInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManageInternal)this).Remove, global::System.Convert.ToString); + } + if (content.Contains("Update")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManageInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManageInternal)this).Update, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -123,9 +134,18 @@ internal UserArtifactManage(global::System.Management.Automation.PSObject conten return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManageInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManageInternal)this).Install, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManageInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManageInternal)this).Remove, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManageInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManageInternal)this).Update, global::System.Convert.ToString); + if (content.Contains("Install")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManageInternal)this).Install = (string) content.GetValueForProperty("Install",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManageInternal)this).Install, global::System.Convert.ToString); + } + if (content.Contains("Remove")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManageInternal)this).Remove = (string) content.GetValueForProperty("Remove",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManageInternal)this).Remove, global::System.Convert.ToString); + } + if (content.Contains("Update")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManageInternal)this).Update = (string) content.GetValueForProperty("Update",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManageInternal)this).Update, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactManage.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactManage.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactManage.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactManage.TypeConverter.cs index fd355ba793f5..83d7a54599a9 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactManage.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactManage.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class UserArtifactManageTypeConverter : global::System.Management { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactManage.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactManage.cs similarity index 98% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactManage.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactManage.cs index d42fda368c40..2e34e741c3dd 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactManage.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactManage.cs @@ -3,13 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; public partial class UserArtifactManage : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManageInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManageInternal { /// Backing field for property. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactManage.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactManage.json.cs similarity index 92% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactManage.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactManage.json.cs index 93fb53d5f554..900d3b2aa844 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactManage.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactManage.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -19,7 +19,7 @@ public partial class UserArtifactManage partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -29,7 +29,8 @@ public partial class UserArtifactManage /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -41,7 +42,8 @@ public partial class UserArtifactManage /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -51,13 +53,13 @@ public partial class UserArtifactManage partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactManage FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactManage FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new UserArtifactManage(json) : null; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSettings.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSettings.PowerShell.cs new file mode 100644 index 000000000000..578d11ce0125 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSettings.PowerShell.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// Additional settings for the VM app that contains the target package and config file name when it is deployed to target + /// VM or VM scale set. + /// + [System.ComponentModel.TypeConverter(typeof(UserArtifactSettingsTypeConverter))] + public partial class UserArtifactSettings + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UserArtifactSettings(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UserArtifactSettings(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UserArtifactSettings(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PackageFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettingsInternal)this).PackageFileName = (string) content.GetValueForProperty("PackageFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettingsInternal)this).PackageFileName, global::System.Convert.ToString); + } + if (content.Contains("ConfigFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettingsInternal)this).ConfigFileName = (string) content.GetValueForProperty("ConfigFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettingsInternal)this).ConfigFileName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UserArtifactSettings(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PackageFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettingsInternal)this).PackageFileName = (string) content.GetValueForProperty("PackageFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettingsInternal)this).PackageFileName, global::System.Convert.ToString); + } + if (content.Contains("ConfigFileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettingsInternal)this).ConfigFileName = (string) content.GetValueForProperty("ConfigFileName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettingsInternal)this).ConfigFileName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// Additional settings for the VM app that contains the target package and config file name when it is deployed to target + /// VM or VM scale set. + [System.ComponentModel.TypeConverter(typeof(UserArtifactSettingsTypeConverter))] + public partial interface IUserArtifactSettings + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSettings.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSettings.TypeConverter.cs new file mode 100644 index 000000000000..3598209cdc54 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSettings.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UserArtifactSettingsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UserArtifactSettings.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UserArtifactSettings.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UserArtifactSettings.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSettings.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSettings.cs new file mode 100644 index 000000000000..d69683d8d926 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSettings.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// + /// Additional settings for the VM app that contains the target package and config file name when it is deployed to target + /// VM or VM scale set. + /// + public partial class UserArtifactSettings : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettingsInternal + { + + /// Backing field for property. + private string _configFileName; + + /// + /// Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, + /// the config file will be named the Gallery Application name appended with "_config". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string ConfigFileName { get => this._configFileName; set => this._configFileName = value; } + + /// Backing field for property. + private string _packageFileName; + + /// + /// Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, + /// the package file will be named the same as the Gallery Application name. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string PackageFileName { get => this._packageFileName; set => this._packageFileName = value; } + + /// Creates an new instance. + public UserArtifactSettings() + { + + } + } + /// Additional settings for the VM app that contains the target package and config file name when it is deployed to target + /// VM or VM scale set. + public partial interface IUserArtifactSettings : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// + /// Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, + /// the config file will be named the Gallery Application name appended with "_config". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with ""_config"".", + SerializedName = @"configFileName", + PossibleTypes = new [] { typeof(string) })] + string ConfigFileName { get; set; } + /// + /// Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, + /// the package file will be named the same as the Gallery Application name. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, the package file will be named the same as the Gallery Application name.", + SerializedName = @"packageFileName", + PossibleTypes = new [] { typeof(string) })] + string PackageFileName { get; set; } + + } + /// Additional settings for the VM app that contains the target package and config file name when it is deployed to target + /// VM or VM scale set. + internal partial interface IUserArtifactSettingsInternal + + { + /// + /// Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, + /// the config file will be named the Gallery Application name appended with "_config". + /// + string ConfigFileName { get; set; } + /// + /// Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, + /// the package file will be named the same as the Gallery Application name. + /// + string PackageFileName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSettings.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSettings.json.cs new file mode 100644 index 000000000000..7e29a9e53118 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSettings.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// + /// Additional settings for the VM app that contains the target package and config file name when it is deployed to target + /// VM or VM scale set. + /// + public partial class UserArtifactSettings + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new UserArtifactSettings(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._packageFileName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._packageFileName.ToString()) : null, "packageFileName" ,container.Add ); + AddIf( null != (((object)this._configFileName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._configFileName.ToString()) : null, "configFileName" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal UserArtifactSettings(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_packageFileName = If( json?.PropertyT("packageFileName"), out var __jsonPackageFileName) ? (string)__jsonPackageFileName : (string)PackageFileName;} + {_configFileName = If( json?.PropertyT("configFileName"), out var __jsonConfigFileName) ? (string)__jsonConfigFileName : (string)ConfigFileName;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactSource.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSource.PowerShell.cs similarity index 72% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactSource.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSource.PowerShell.cs index 34a1c5ae2567..8cc4a9793282 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactSource.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class UserArtifactSource /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class UserArtifactSource /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -53,27 +55,27 @@ public partial class UserArtifactSource partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UserArtifactSource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UserArtifactSource(content); } @@ -82,8 +84,8 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUse /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -91,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUse public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,13 +106,19 @@ internal UserArtifactSource(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSourceInternal)this).MediaLink = (string) content.GetValueForProperty("MediaLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSourceInternal)this).MediaLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSourceInternal)this).DefaultConfigurationLink = (string) content.GetValueForProperty("DefaultConfigurationLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSourceInternal)this).DefaultConfigurationLink, global::System.Convert.ToString); + if (content.Contains("MediaLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSourceInternal)this).MediaLink = (string) content.GetValueForProperty("MediaLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSourceInternal)this).MediaLink, global::System.Convert.ToString); + } + if (content.Contains("DefaultConfigurationLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSourceInternal)this).DefaultConfigurationLink = (string) content.GetValueForProperty("DefaultConfigurationLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSourceInternal)this).DefaultConfigurationLink, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -123,8 +131,14 @@ internal UserArtifactSource(global::System.Management.Automation.PSObject conten return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSourceInternal)this).MediaLink = (string) content.GetValueForProperty("MediaLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSourceInternal)this).MediaLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSourceInternal)this).DefaultConfigurationLink = (string) content.GetValueForProperty("DefaultConfigurationLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSourceInternal)this).DefaultConfigurationLink, global::System.Convert.ToString); + if (content.Contains("MediaLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSourceInternal)this).MediaLink = (string) content.GetValueForProperty("MediaLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSourceInternal)this).MediaLink, global::System.Convert.ToString); + } + if (content.Contains("DefaultConfigurationLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSourceInternal)this).DefaultConfigurationLink = (string) content.GetValueForProperty("DefaultConfigurationLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSourceInternal)this).DefaultConfigurationLink, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactSource.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSource.TypeConverter.cs similarity index 82% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactSource.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSource.TypeConverter.cs index 546bfc021022..bd5188349371 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactSource.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class UserArtifactSourceTypeConverter : global::System.Management { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactSource.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSource.cs similarity index 98% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactSource.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSource.cs index 440d920f24b2..562927f1cce5 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactSource.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSource.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// The source image from which the Image Version is going to be created. public partial class UserArtifactSource : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSourceInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSourceInternal { /// Backing field for property. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactSource.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSource.json.cs similarity index 92% rename from src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactSource.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSource.json.cs index bd25b27c76c5..c7635de591f0 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20210701/UserArtifactSource.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/UserArtifactSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class UserArtifactSource partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class UserArtifactSource /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class UserArtifactSource /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. @@ -52,13 +54,13 @@ public partial class UserArtifactSource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUserArtifactSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUserArtifactSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new UserArtifactSource(json) : null; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.PowerShell.cs index 2b62251dbe78..b05adb1403e0 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.PowerShell.cs @@ -30,7 +30,8 @@ public partial class ComputeIdentity /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -42,7 +43,8 @@ public partial class ComputeIdentity /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -65,20 +67,62 @@ internal ComputeIdentity(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryName = (string) content.GetValueForProperty("GalleryName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryImageName = (string) content.GetValueForProperty("GalleryImageName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryImageName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryImageVersionName = (string) content.GetValueForProperty("GalleryImageVersionName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryImageVersionName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryApplicationName = (string) content.GetValueForProperty("GalleryApplicationName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryApplicationName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryApplicationVersionName = (string) content.GetValueForProperty("GalleryApplicationVersionName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryApplicationVersionName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Location, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).CommandId = (string) content.GetValueForProperty("CommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).CommandId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).VMName = (string) content.GetValueForProperty("VMName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).VMName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).RunCommandName = (string) content.GetValueForProperty("RunCommandName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).RunCommandName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).VMScaleSetName = (string) content.GetValueForProperty("VMScaleSetName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).VMScaleSetName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).InstanceId = (string) content.GetValueForProperty("InstanceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).InstanceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Id, global::System.Convert.ToString); + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("ResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("GalleryName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryName = (string) content.GetValueForProperty("GalleryName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryName, global::System.Convert.ToString); + } + if (content.Contains("GalleryImageName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryImageName = (string) content.GetValueForProperty("GalleryImageName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryImageName, global::System.Convert.ToString); + } + if (content.Contains("GalleryImageVersionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryImageVersionName = (string) content.GetValueForProperty("GalleryImageVersionName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryImageVersionName, global::System.Convert.ToString); + } + if (content.Contains("GalleryApplicationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryApplicationName = (string) content.GetValueForProperty("GalleryApplicationName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryApplicationName, global::System.Convert.ToString); + } + if (content.Contains("GalleryApplicationVersionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryApplicationVersionName = (string) content.GetValueForProperty("GalleryApplicationVersionName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryApplicationVersionName, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("CommandId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).CommandId = (string) content.GetValueForProperty("CommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).CommandId, global::System.Convert.ToString); + } + if (content.Contains("VMName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).VMName = (string) content.GetValueForProperty("VMName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).VMName, global::System.Convert.ToString); + } + if (content.Contains("RunCommandName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).RunCommandName = (string) content.GetValueForProperty("RunCommandName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).RunCommandName, global::System.Convert.ToString); + } + if (content.Contains("VMScaleSetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).VMScaleSetName = (string) content.GetValueForProperty("VMScaleSetName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).VMScaleSetName, global::System.Convert.ToString); + } + if (content.Contains("InstanceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).InstanceId = (string) content.GetValueForProperty("InstanceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).InstanceId, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Id, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -96,20 +140,62 @@ internal ComputeIdentity(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryName = (string) content.GetValueForProperty("GalleryName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryImageName = (string) content.GetValueForProperty("GalleryImageName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryImageName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryImageVersionName = (string) content.GetValueForProperty("GalleryImageVersionName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryImageVersionName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryApplicationName = (string) content.GetValueForProperty("GalleryApplicationName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryApplicationName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryApplicationVersionName = (string) content.GetValueForProperty("GalleryApplicationVersionName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryApplicationVersionName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Location, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).CommandId = (string) content.GetValueForProperty("CommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).CommandId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).VMName = (string) content.GetValueForProperty("VMName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).VMName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).RunCommandName = (string) content.GetValueForProperty("RunCommandName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).RunCommandName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).VMScaleSetName = (string) content.GetValueForProperty("VMScaleSetName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).VMScaleSetName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).InstanceId = (string) content.GetValueForProperty("InstanceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).InstanceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Id, global::System.Convert.ToString); + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("ResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("GalleryName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryName = (string) content.GetValueForProperty("GalleryName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryName, global::System.Convert.ToString); + } + if (content.Contains("GalleryImageName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryImageName = (string) content.GetValueForProperty("GalleryImageName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryImageName, global::System.Convert.ToString); + } + if (content.Contains("GalleryImageVersionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryImageVersionName = (string) content.GetValueForProperty("GalleryImageVersionName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryImageVersionName, global::System.Convert.ToString); + } + if (content.Contains("GalleryApplicationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryApplicationName = (string) content.GetValueForProperty("GalleryApplicationName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryApplicationName, global::System.Convert.ToString); + } + if (content.Contains("GalleryApplicationVersionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryApplicationVersionName = (string) content.GetValueForProperty("GalleryApplicationVersionName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).GalleryApplicationVersionName, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("CommandId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).CommandId = (string) content.GetValueForProperty("CommandId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).CommandId, global::System.Convert.ToString); + } + if (content.Contains("VMName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).VMName = (string) content.GetValueForProperty("VMName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).VMName, global::System.Convert.ToString); + } + if (content.Contains("RunCommandName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).RunCommandName = (string) content.GetValueForProperty("RunCommandName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).RunCommandName, global::System.Convert.ToString); + } + if (content.Contains("VMScaleSetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).VMScaleSetName = (string) content.GetValueForProperty("VMScaleSetName",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).VMScaleSetName, global::System.Convert.ToString); + } + if (content.Contains("InstanceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).InstanceId = (string) content.GetValueForProperty("InstanceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).InstanceId, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Id, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } @@ -143,7 +229,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.TypeConverter.cs index 04e3fabb2b28..100eea5d769c 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class ComputeIdentityTypeConverter : global::System.Management.Au { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -80,19 +80,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -104,8 +105,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.json.cs index 82769ebe1b0a..048c9e94a4a3 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.json.cs @@ -19,7 +19,7 @@ public partial class ComputeIdentity partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -29,7 +29,8 @@ public partial class ComputeIdentity /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -41,7 +42,8 @@ public partial class ComputeIdentity /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/Compute/Compute.Autorest/generated/api/Support/AggregatedReplicationState.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/AggregatedReplicationState.TypeConverter.cs index 4ab3153d0aca..e45ee2f13173 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/AggregatedReplicationState.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/AggregatedReplicationState.TypeConverter.cs @@ -14,32 +14,32 @@ public partial class AggregatedReplicationStateTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/Compute/Compute.Autorest/generated/api/Support/AggregatedReplicationState.cs b/src/Compute/Compute.Autorest/generated/api/Support/AggregatedReplicationState.cs index b38e1073feb9..bba1460f82d0 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/AggregatedReplicationState.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/AggregatedReplicationState.cs @@ -25,7 +25,7 @@ public partial struct AggregatedReplicationState : /// private string _value { get; set; } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private AggregatedReplicationState(string underlyingValue) { @@ -86,8 +86,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding != operator for enum AggregatedReplicationState - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState e2) { @@ -95,8 +95,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding == operator for enum AggregatedReplicationState - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.AggregatedReplicationState e2) { diff --git a/src/Compute/Compute.Autorest/generated/api/Support/Architecture.Completer.cs b/src/Compute/Compute.Autorest/generated/api/Support/Architecture.Completer.cs new file mode 100644 index 000000000000..ca2ce64c80a3 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/Architecture.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// The architecture of the image. Applicable to OS disks only. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ArchitectureTypeConverter))] + public partial struct Architecture : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "x64".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'x64'", "x64", global::System.Management.Automation.CompletionResultType.ParameterValue, "x64"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Arm64".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Arm64'", "Arm64", global::System.Management.Automation.CompletionResultType.ParameterValue, "Arm64"); + } + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/Architecture.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/Architecture.TypeConverter.cs new file mode 100644 index 000000000000..229902a78850 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/Architecture.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// The architecture of the image. Applicable to OS disks only. + public partial class ArchitectureTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => Architecture.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/Architecture.cs b/src/Compute/Compute.Autorest/generated/api/Support/Architecture.cs new file mode 100644 index 000000000000..6946c5fa62eb --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/Architecture.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// The architecture of the image. Applicable to OS disks only. + public partial struct Architecture : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture Arm64 = @"Arm64"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture X64 = @"x64"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private Architecture(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to Architecture + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new Architecture(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type Architecture + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type Architecture (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is Architecture && Equals((Architecture)obj); + } + + /// Returns hashCode for enum Architecture + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for Architecture + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to Architecture + /// the value to convert to an instance of . + + public static implicit operator Architecture(string value) + { + return new Architecture(value); + } + + /// Implicit operator to convert Architecture to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture e) + { + return e._value; + } + + /// Overriding != operator for enum Architecture + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum Architecture + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/ConfidentialVMEncryptionType.Completer.cs b/src/Compute/Compute.Autorest/generated/api/Support/ConfidentialVMEncryptionType.Completer.cs new file mode 100644 index 000000000000..9215d91cf95e --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/ConfidentialVMEncryptionType.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// confidential VM encryption types + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionTypeTypeConverter))] + public partial struct ConfidentialVMEncryptionType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EncryptedVMGuestStateOnlyWithPmk".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EncryptedVMGuestStateOnlyWithPmk'", "EncryptedVMGuestStateOnlyWithPmk", global::System.Management.Automation.CompletionResultType.ParameterValue, "EncryptedVMGuestStateOnlyWithPmk"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EncryptedWithPmk".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EncryptedWithPmk'", "EncryptedWithPmk", global::System.Management.Automation.CompletionResultType.ParameterValue, "EncryptedWithPmk"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EncryptedWithCmk".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EncryptedWithCmk'", "EncryptedWithCmk", global::System.Management.Automation.CompletionResultType.ParameterValue, "EncryptedWithCmk"); + } + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/ConfidentialVMEncryptionType.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/ConfidentialVMEncryptionType.TypeConverter.cs new file mode 100644 index 000000000000..04f4ba6aced6 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/ConfidentialVMEncryptionType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// confidential VM encryption types + public partial class ConfidentialVMEncryptionTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConfidentialVMEncryptionType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/ConfidentialVMEncryptionType.cs b/src/Compute/Compute.Autorest/generated/api/Support/ConfidentialVMEncryptionType.cs new file mode 100644 index 000000000000..0cb19945c8da --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/ConfidentialVMEncryptionType.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// confidential VM encryption types + public partial struct ConfidentialVMEncryptionType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType EncryptedVMGuestStateOnlyWithPmk = @"EncryptedVMGuestStateOnlyWithPmk"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType EncryptedWithCmk = @"EncryptedWithCmk"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType EncryptedWithPmk = @"EncryptedWithPmk"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private ConfidentialVMEncryptionType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to ConfidentialVMEncryptionType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ConfidentialVMEncryptionType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ConfidentialVMEncryptionType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ConfidentialVMEncryptionType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ConfidentialVMEncryptionType && Equals((ConfidentialVMEncryptionType)obj); + } + + /// Returns hashCode for enum ConfidentialVMEncryptionType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ConfidentialVMEncryptionType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ConfidentialVMEncryptionType + /// the value to convert to an instance of . + + public static implicit operator ConfidentialVMEncryptionType(string value) + { + return new ConfidentialVMEncryptionType(value); + } + + /// Implicit operator to convert ConfidentialVMEncryptionType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType e) + { + return e._value; + } + + /// Overriding != operator for enum ConfidentialVMEncryptionType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ConfidentialVMEncryptionType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ConfidentialVMEncryptionType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/ExecutionState.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/ExecutionState.TypeConverter.cs index 4d02b3262d01..d29a1ce137f5 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/ExecutionState.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/ExecutionState.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class ExecutionStateTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/Compute/Compute.Autorest/generated/api/Support/ExecutionState.cs b/src/Compute/Compute.Autorest/generated/api/Support/ExecutionState.cs index 38fe2c61a908..e17960926d36 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/ExecutionState.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/ExecutionState.cs @@ -50,7 +50,7 @@ public override bool Equals(object obj) return obj is ExecutionState && Equals((ExecutionState)obj); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private ExecutionState(string underlyingValue) { @@ -88,8 +88,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding != operator for enum ExecutionState - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState e2) { @@ -97,8 +97,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding == operator for enum ExecutionState - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ExecutionState e2) { diff --git a/src/Compute/Compute.Autorest/generated/api/Support/GalleryExpandParams.Completer.cs b/src/Compute/Compute.Autorest/generated/api/Support/GalleryExpandParams.Completer.cs new file mode 100644 index 000000000000..81a959bf9c94 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/GalleryExpandParams.Completer.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// Argument completer implementation for GalleryExpandParams. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExpandParamsTypeConverter))] + public partial struct GalleryExpandParams : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "SharingProfile/Groups".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'SharingProfile/Groups'", "SharingProfile/Groups", global::System.Management.Automation.CompletionResultType.ParameterValue, "SharingProfile/Groups"); + } + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/GalleryExpandParams.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/GalleryExpandParams.TypeConverter.cs new file mode 100644 index 000000000000..6b9ba4c4bdc0 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/GalleryExpandParams.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// TypeConverter implementation for GalleryExpandParams. + public partial class GalleryExpandParamsTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => GalleryExpandParams.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/GalleryExpandParams.cs b/src/Compute/Compute.Autorest/generated/api/Support/GalleryExpandParams.cs new file mode 100644 index 000000000000..2d00720543db --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/GalleryExpandParams.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + public partial struct GalleryExpandParams : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExpandParams SharingProfileGroups = @"SharingProfile/Groups"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to GalleryExpandParams + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new GalleryExpandParams(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type GalleryExpandParams + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExpandParams e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type GalleryExpandParams (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is GalleryExpandParams && Equals((GalleryExpandParams)obj); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private GalleryExpandParams(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns hashCode for enum GalleryExpandParams + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for GalleryExpandParams + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to GalleryExpandParams + /// the value to convert to an instance of . + + public static implicit operator GalleryExpandParams(string value) + { + return new GalleryExpandParams(value); + } + + /// Implicit operator to convert GalleryExpandParams to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExpandParams e) + { + return e._value; + } + + /// Overriding != operator for enum GalleryExpandParams + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExpandParams e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExpandParams e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum GalleryExpandParams + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExpandParams e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExpandParams e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/GalleryExtendedLocationType.Completer.cs b/src/Compute/Compute.Autorest/generated/api/Support/GalleryExtendedLocationType.Completer.cs new file mode 100644 index 000000000000..7df1bfbe2669 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/GalleryExtendedLocationType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// It is type of the extended location. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationTypeTypeConverter))] + public partial struct GalleryExtendedLocationType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EdgeZone".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EdgeZone'", "EdgeZone", global::System.Management.Automation.CompletionResultType.ParameterValue, "EdgeZone"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Unknown".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Unknown'", "Unknown", global::System.Management.Automation.CompletionResultType.ParameterValue, "Unknown"); + } + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/GalleryExtendedLocationType.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/GalleryExtendedLocationType.TypeConverter.cs new file mode 100644 index 000000000000..7669160a4a08 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/GalleryExtendedLocationType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// It is type of the extended location. + public partial class GalleryExtendedLocationTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => GalleryExtendedLocationType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/GalleryExtendedLocationType.cs b/src/Compute/Compute.Autorest/generated/api/Support/GalleryExtendedLocationType.cs new file mode 100644 index 000000000000..ae4ffea412f2 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/GalleryExtendedLocationType.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// It is type of the extended location. + public partial struct GalleryExtendedLocationType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType EdgeZone = @"EdgeZone"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType Unknown = @"Unknown"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to GalleryExtendedLocationType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new GalleryExtendedLocationType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type GalleryExtendedLocationType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type GalleryExtendedLocationType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is GalleryExtendedLocationType && Equals((GalleryExtendedLocationType)obj); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private GalleryExtendedLocationType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns hashCode for enum GalleryExtendedLocationType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for GalleryExtendedLocationType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to GalleryExtendedLocationType + /// the value to convert to an instance of . + + public static implicit operator GalleryExtendedLocationType(string value) + { + return new GalleryExtendedLocationType(value); + } + + /// Implicit operator to convert GalleryExtendedLocationType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType e) + { + return e._value; + } + + /// Overriding != operator for enum GalleryExtendedLocationType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum GalleryExtendedLocationType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExtendedLocationType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/GalleryProvisioningState.Completer.cs b/src/Compute/Compute.Autorest/generated/api/Support/GalleryProvisioningState.Completer.cs new file mode 100644 index 000000000000..7628fc96cd17 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/GalleryProvisioningState.Completer.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// The provisioning state, which only appears in the response. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningStateTypeConverter))] + public partial struct GalleryProvisioningState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Updating'", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Migrating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Migrating'", "Migrating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Migrating"); + } + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/GalleryProvisioningState.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/GalleryProvisioningState.TypeConverter.cs new file mode 100644 index 000000000000..bdb575227665 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/GalleryProvisioningState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// The provisioning state, which only appears in the response. + public partial class GalleryProvisioningStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => GalleryProvisioningState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/GalleryProvisioningState.cs b/src/Compute/Compute.Autorest/generated/api/Support/GalleryProvisioningState.cs new file mode 100644 index 000000000000..d6c2aa00998f --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/GalleryProvisioningState.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// The provisioning state, which only appears in the response. + public partial struct GalleryProvisioningState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState Creating = @"Creating"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState Deleting = @"Deleting"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState Failed = @"Failed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState Migrating = @"Migrating"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState Succeeded = @"Succeeded"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState Updating = @"Updating"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to GalleryProvisioningState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new GalleryProvisioningState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type GalleryProvisioningState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type GalleryProvisioningState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is GalleryProvisioningState && Equals((GalleryProvisioningState)obj); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private GalleryProvisioningState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns hashCode for enum GalleryProvisioningState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for GalleryProvisioningState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to GalleryProvisioningState + /// the value to convert to an instance of . + + public static implicit operator GalleryProvisioningState(string value) + { + return new GalleryProvisioningState(value); + } + + /// Implicit operator to convert GalleryProvisioningState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState e) + { + return e._value; + } + + /// Overriding != operator for enum GalleryProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum GalleryProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/GallerySharingPermissionTypes.Completer.cs b/src/Compute/Compute.Autorest/generated/api/Support/GallerySharingPermissionTypes.Completer.cs index 6a7f1d80f1c7..c898c8475bfe 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/GallerySharingPermissionTypes.Completer.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/GallerySharingPermissionTypes.Completer.cs @@ -8,7 +8,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support /// /// This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private** - ///

**Groups** + ///

**Groups**

**Community** ///
[System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypesTypeConverter))] public partial struct GallerySharingPermissionTypes : @@ -37,6 +37,10 @@ public partial struct GallerySharingPermissionTypes : { yield return new global::System.Management.Automation.CompletionResult("'Groups'", "Groups", global::System.Management.Automation.CompletionResultType.ParameterValue, "Groups"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Community".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Community'", "Community", global::System.Management.Automation.CompletionResultType.ParameterValue, "Community"); + } } } } \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/GallerySharingPermissionTypes.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/GallerySharingPermissionTypes.TypeConverter.cs index 2d1fab328a9e..0c3c62c7848d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/GallerySharingPermissionTypes.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/GallerySharingPermissionTypes.TypeConverter.cs @@ -8,39 +8,39 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support /// /// This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private** - ///

**Groups** + ///

**Groups**

**Community** ///
public partial class GallerySharingPermissionTypesTypeConverter : global::System.Management.Automation.PSTypeConverter { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/Compute/Compute.Autorest/generated/api/Support/GallerySharingPermissionTypes.cs b/src/Compute/Compute.Autorest/generated/api/Support/GallerySharingPermissionTypes.cs index a315660324d6..8d7a0258fe7b 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/GallerySharingPermissionTypes.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/GallerySharingPermissionTypes.cs @@ -8,11 +8,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support /// /// This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private** - ///

**Groups** + ///

**Groups**

**Community** ///
public partial struct GallerySharingPermissionTypes : System.IEquatable { + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes Community = @"Community"; + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes Groups = @"Groups"; public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes Private = @"Private"; @@ -48,7 +50,7 @@ public override bool Equals(object obj) } /// - /// Creates an instance of the + /// Creates an instance of the Enum class. /// /// the value to create an instance for. private GallerySharingPermissionTypes(string underlyingValue) @@ -87,8 +89,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding != operator for enum GallerySharingPermissionTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes e2) { @@ -96,8 +98,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding == operator for enum GallerySharingPermissionTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GallerySharingPermissionTypes e2) { diff --git a/src/Compute/Compute.Autorest/generated/api/Support/HostCaching.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/HostCaching.TypeConverter.cs index 8e89b0ea3273..5c53dd75035a 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/HostCaching.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/HostCaching.TypeConverter.cs @@ -14,32 +14,32 @@ public partial class HostCachingTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/Compute/Compute.Autorest/generated/api/Support/HostCaching.cs b/src/Compute/Compute.Autorest/generated/api/Support/HostCaching.cs index b1c9e8261cd2..460710182d16 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/HostCaching.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/HostCaching.cs @@ -51,7 +51,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private HostCaching(string underlyingValue) { @@ -82,8 +82,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding != operator for enum HostCaching - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching e2) { @@ -91,8 +91,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding == operator for enum HostCaching - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HostCaching e2) { diff --git a/src/Compute/Compute.Autorest/generated/api/Support/HyperVGeneration.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/HyperVGeneration.TypeConverter.cs index 55507918be93..d5cdf8523cbe 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/HyperVGeneration.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/HyperVGeneration.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class HyperVGenerationTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/Compute/Compute.Autorest/generated/api/Support/HyperVGeneration.cs b/src/Compute/Compute.Autorest/generated/api/Support/HyperVGeneration.cs index 75156982777c..c6cb2da613a3 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/HyperVGeneration.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/HyperVGeneration.cs @@ -47,7 +47,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private HyperVGeneration(string underlyingValue) { @@ -78,8 +78,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding != operator for enum HyperVGeneration - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration e2) { @@ -87,8 +87,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding == operator for enum HyperVGeneration - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.HyperVGeneration e2) { diff --git a/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemStateTypes.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemStateTypes.TypeConverter.cs index 6ce3d8a55188..23e601dcb21e 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemStateTypes.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemStateTypes.TypeConverter.cs @@ -14,32 +14,32 @@ public partial class OperatingSystemStateTypesTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemStateTypes.cs b/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemStateTypes.cs index 9853286afbcb..4fe76cc9e611 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemStateTypes.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemStateTypes.cs @@ -49,7 +49,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private OperatingSystemStateTypes(string underlyingValue) { @@ -80,8 +80,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding != operator for enum OperatingSystemStateTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes e2) { @@ -89,8 +89,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding == operator for enum OperatingSystemStateTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemStateTypes e2) { diff --git a/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemTypes.Completer.cs b/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemTypes.Completer.cs index 53cc833464f0..778a0e44664a 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemTypes.Completer.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemTypes.Completer.cs @@ -6,10 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support { - /// - /// This property allows you to specify the supported type of the OS that application is built for.

Possible values - /// are:

**Windows**

**Linux** - ///
+ /// The Operating System type. [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypesTypeConverter))] public partial struct OperatingSystemTypes : System.Management.Automation.IArgumentCompleter diff --git a/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemTypes.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemTypes.TypeConverter.cs index 90bd08f935dc..9c8165417b62 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemTypes.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemTypes.TypeConverter.cs @@ -6,41 +6,38 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support { - /// - /// This property allows you to specify the supported type of the OS that application is built for.

Possible values - /// are:

**Windows**

**Linux** - ///
+ /// The Operating System type. public partial class OperatingSystemTypesTypeConverter : global::System.Management.Automation.PSTypeConverter { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemTypes.cs b/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemTypes.cs index d95c0f68a56f..b84011410b23 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemTypes.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/OperatingSystemTypes.cs @@ -6,10 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support { - /// - /// This property allows you to specify the supported type of the OS that application is built for.

Possible values - /// are:

**Windows**

**Linux** - ///
+ /// The Operating System type. public partial struct OperatingSystemTypes : System.IEquatable { @@ -50,7 +47,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private OperatingSystemTypes(string underlyingValue) { @@ -81,8 +78,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding != operator for enum OperatingSystemTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes e2) { @@ -90,8 +87,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding == operator for enum OperatingSystemTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes e2) { diff --git a/src/Compute/Compute.Autorest/generated/api/Support/ReplicationMode.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/ReplicationMode.TypeConverter.cs index 03f6b06023d5..0c2131955ceb 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/ReplicationMode.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/ReplicationMode.TypeConverter.cs @@ -14,32 +14,32 @@ public partial class ReplicationModeTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/Compute/Compute.Autorest/generated/api/Support/ReplicationMode.cs b/src/Compute/Compute.Autorest/generated/api/Support/ReplicationMode.cs index 3e427943685c..6cd93e507d08 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/ReplicationMode.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/ReplicationMode.cs @@ -49,7 +49,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private ReplicationMode(string underlyingValue) { @@ -80,8 +80,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding != operator for enum ReplicationMode - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode e2) { @@ -89,8 +89,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding == operator for enum ReplicationMode - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode e2) { diff --git a/src/Compute/Compute.Autorest/generated/api/Support/ReplicationState.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/ReplicationState.TypeConverter.cs index edad2db5fddc..56c1b442f59b 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/ReplicationState.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/ReplicationState.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class ReplicationStateTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/Compute/Compute.Autorest/generated/api/Support/ReplicationState.cs b/src/Compute/Compute.Autorest/generated/api/Support/ReplicationState.cs index 7ffb22a9deb3..115f571859a9 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/ReplicationState.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/ReplicationState.cs @@ -51,7 +51,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private ReplicationState(string underlyingValue) { @@ -82,8 +82,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding != operator for enum ReplicationState - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationState e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationState e2) { @@ -91,8 +91,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding == operator for enum ReplicationState - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationState e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationState e2) { diff --git a/src/Compute/Compute.Autorest/generated/api/Support/ReplicationStatusTypes.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/ReplicationStatusTypes.TypeConverter.cs index d100cc4ffead..5e537c9d150d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/ReplicationStatusTypes.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/ReplicationStatusTypes.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class ReplicationStatusTypesTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/Compute/Compute.Autorest/generated/api/Support/ReplicationStatusTypes.cs b/src/Compute/Compute.Autorest/generated/api/Support/ReplicationStatusTypes.cs index 4d3e0831be07..11fcc6641010 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/ReplicationStatusTypes.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/ReplicationStatusTypes.cs @@ -44,7 +44,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private ReplicationStatusTypes(string underlyingValue) { @@ -75,8 +75,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding != operator for enum ReplicationStatusTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes e2) { @@ -84,8 +84,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding == operator for enum ReplicationStatusTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes e2) { diff --git a/src/Compute/Compute.Autorest/generated/api/Support/SelectPermissions.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/SelectPermissions.TypeConverter.cs index 0b70351a182e..af825550428b 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/SelectPermissions.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/SelectPermissions.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class SelectPermissionsTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/Compute/Compute.Autorest/generated/api/Support/SelectPermissions.cs b/src/Compute/Compute.Autorest/generated/api/Support/SelectPermissions.cs index e48f1ebc947a..15eee919de7b 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/SelectPermissions.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/SelectPermissions.cs @@ -44,7 +44,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private SelectPermissions(string underlyingValue) { @@ -75,8 +75,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding != operator for enum SelectPermissions - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SelectPermissions e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SelectPermissions e2) { @@ -84,8 +84,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding == operator for enum SelectPermissions - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SelectPermissions e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SelectPermissions e2) { diff --git a/src/Compute/Compute.Autorest/generated/api/Support/SharingProfileGroupTypes.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/SharingProfileGroupTypes.TypeConverter.cs index 86fc9a544935..4d5116972cfd 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/SharingProfileGroupTypes.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/SharingProfileGroupTypes.TypeConverter.cs @@ -15,32 +15,32 @@ public partial class SharingProfileGroupTypesTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/Compute/Compute.Autorest/generated/api/Support/SharingProfileGroupTypes.cs b/src/Compute/Compute.Autorest/generated/api/Support/SharingProfileGroupTypes.cs index 483781e58759..62805e770383 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/SharingProfileGroupTypes.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/SharingProfileGroupTypes.cs @@ -50,7 +50,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private SharingProfileGroupTypes(string underlyingValue) { @@ -81,8 +81,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding != operator for enum SharingProfileGroupTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingProfileGroupTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingProfileGroupTypes e2) { @@ -90,8 +90,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding == operator for enum SharingProfileGroupTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingProfileGroupTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingProfileGroupTypes e2) { diff --git a/src/Compute/Compute.Autorest/generated/api/Support/SharingState.Completer.cs b/src/Compute/Compute.Autorest/generated/api/Support/SharingState.Completer.cs new file mode 100644 index 000000000000..f0c0f8ad2c07 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/SharingState.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// The sharing state of the gallery, which only appears in the response. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingStateTypeConverter))] + public partial struct SharingState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "InProgress".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'InProgress'", "InProgress", global::System.Management.Automation.CompletionResultType.ParameterValue, "InProgress"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Unknown".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Unknown'", "Unknown", global::System.Management.Automation.CompletionResultType.ParameterValue, "Unknown"); + } + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/SharingState.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/SharingState.TypeConverter.cs new file mode 100644 index 000000000000..c4c7c5a8af27 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/SharingState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// The sharing state of the gallery, which only appears in the response. + public partial class SharingStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => SharingState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/SharingState.cs b/src/Compute/Compute.Autorest/generated/api/Support/SharingState.cs new file mode 100644 index 000000000000..9e15033d4b0f --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/SharingState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// The sharing state of the gallery, which only appears in the response. + public partial struct SharingState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState Failed = @"Failed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState InProgress = @"InProgress"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState Succeeded = @"Succeeded"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState Unknown = @"Unknown"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to SharingState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new SharingState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type SharingState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type SharingState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is SharingState && Equals((SharingState)obj); + } + + /// Returns hashCode for enum SharingState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private SharingState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for SharingState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to SharingState + /// the value to convert to an instance of . + + public static implicit operator SharingState(string value) + { + return new SharingState(value); + } + + /// Implicit operator to convert SharingState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState e) + { + return e._value; + } + + /// Overriding != operator for enum SharingState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum SharingState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/SharingUpdateOperationTypes.Completer.cs b/src/Compute/Compute.Autorest/generated/api/Support/SharingUpdateOperationTypes.Completer.cs index 70b885cfcb4b..280c2b67a90f 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/SharingUpdateOperationTypes.Completer.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/SharingUpdateOperationTypes.Completer.cs @@ -41,6 +41,10 @@ public partial struct SharingUpdateOperationTypes : { yield return new global::System.Management.Automation.CompletionResult("'Reset'", "Reset", global::System.Management.Automation.CompletionResultType.ParameterValue, "Reset"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EnableCommunity".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EnableCommunity'", "EnableCommunity", global::System.Management.Automation.CompletionResultType.ParameterValue, "EnableCommunity"); + } } } } \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/SharingUpdateOperationTypes.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/SharingUpdateOperationTypes.TypeConverter.cs index 3acb6d0d801d..5d2edca6d98d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/SharingUpdateOperationTypes.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/SharingUpdateOperationTypes.TypeConverter.cs @@ -15,32 +15,32 @@ public partial class SharingUpdateOperationTypesTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/Compute/Compute.Autorest/generated/api/Support/SharingUpdateOperationTypes.cs b/src/Compute/Compute.Autorest/generated/api/Support/SharingUpdateOperationTypes.cs index ee56d9322690..7d06ee99c410 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/SharingUpdateOperationTypes.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/SharingUpdateOperationTypes.cs @@ -15,6 +15,8 @@ public partial struct SharingUpdateOperationTypes : { public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingUpdateOperationTypes Add = @"Add"; + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingUpdateOperationTypes EnableCommunity = @"EnableCommunity"; + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingUpdateOperationTypes Remove = @"Remove"; public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingUpdateOperationTypes Reset = @"Reset"; @@ -55,7 +57,7 @@ public override int GetHashCode() } /// - /// Creates an instance of the + /// Creates an instance of the Enum class. /// /// the value to create an instance for. private SharingUpdateOperationTypes(string underlyingValue) @@ -87,8 +89,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding != operator for enum SharingUpdateOperationTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingUpdateOperationTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingUpdateOperationTypes e2) { @@ -96,8 +98,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding == operator for enum SharingUpdateOperationTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingUpdateOperationTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SharingUpdateOperationTypes e2) { diff --git a/src/Compute/Compute.Autorest/generated/api/Support/StatusLevelTypes.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/StatusLevelTypes.TypeConverter.cs index b539cac8014f..b4eacfe51343 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/StatusLevelTypes.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/StatusLevelTypes.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class StatusLevelTypesTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/Compute/Compute.Autorest/generated/api/Support/StatusLevelTypes.cs b/src/Compute/Compute.Autorest/generated/api/Support/StatusLevelTypes.cs index 34b610056fd0..b5de0439bdc8 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/StatusLevelTypes.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/StatusLevelTypes.cs @@ -49,7 +49,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private StatusLevelTypes(string underlyingValue) { @@ -80,8 +80,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding != operator for enum StatusLevelTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StatusLevelTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StatusLevelTypes e2) { @@ -89,8 +89,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding == operator for enum StatusLevelTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StatusLevelTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StatusLevelTypes e2) { diff --git a/src/Compute/Compute.Autorest/generated/api/Support/StorageAccountType.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/StorageAccountType.TypeConverter.cs index f0f4e16b03b7..649e91ef7272 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/StorageAccountType.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/StorageAccountType.TypeConverter.cs @@ -14,32 +14,32 @@ public partial class StorageAccountTypeTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/Compute/Compute.Autorest/generated/api/Support/StorageAccountType.cs b/src/Compute/Compute.Autorest/generated/api/Support/StorageAccountType.cs index e464a121d6dd..139fd91bf32d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Support/StorageAccountType.cs +++ b/src/Compute/Compute.Autorest/generated/api/Support/StorageAccountType.cs @@ -51,7 +51,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private StorageAccountType(string underlyingValue) { @@ -82,8 +82,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding != operator for enum StorageAccountType - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType e2) { @@ -91,8 +91,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Comput } /// Overriding == operator for enum StorageAccountType - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType e2) { diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_Get.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_Get.cs index 03c451e90c9f..5b8a14b8096f 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_Get.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_Get.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzGalleryApplicationVersion_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Description(@"Retrieves information about a gallery Application Version.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Generated] public partial class GetAzGalleryApplicationVersion_Get : global::System.Management.Automation.PSCmdlet, @@ -113,11 +113,11 @@ public partial class GetAzGalleryApplicationVersion_Get : global::System.Managem public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -196,8 +196,8 @@ public partial class GetAzGalleryApplicationVersion_Get : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -208,18 +208,23 @@ public partial class GetAzGalleryApplicationVersion_Get : global::System.Managem /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -231,7 +236,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -339,7 +344,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -385,8 +389,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -425,12 +429,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -442,7 +446,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion WriteObject((await response)); } } diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_GetViaIdentity.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_GetViaIdentity.cs index 51ccb2d7187a..b6d8f784d605 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_GetViaIdentity.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_GetViaIdentity.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzGalleryApplicationVersion_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Description(@"Retrieves information about a gallery Application Version.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Generated] public partial class GetAzGalleryApplicationVersion_GetViaIdentity : global::System.Management.Automation.PSCmdlet, @@ -89,11 +89,11 @@ public partial class GetAzGalleryApplicationVersion_GetViaIdentity : global::Sys public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -122,8 +122,8 @@ public partial class GetAzGalleryApplicationVersion_GetViaIdentity : global::Sys /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -134,18 +134,23 @@ public partial class GetAzGalleryApplicationVersion_GetViaIdentity : global::Sys /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -157,7 +162,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -265,7 +270,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -336,8 +340,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -376,12 +380,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -393,7 +397,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion WriteObject((await response)); } } diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_List.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_List.cs index 38366bbf6bcd..6c8c4e142bd8 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_List.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_List.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets /// [OpenAPI] ListByGalleryApplication=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzGalleryApplicationVersion_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Description(@"List gallery Application Versions in a gallery Application Definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Generated] public partial class GetAzGalleryApplicationVersion_List : global::System.Management.Automation.PSCmdlet, @@ -104,11 +104,11 @@ public partial class GetAzGalleryApplicationVersion_List : global::System.Manage public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -172,8 +172,8 @@ public partial class GetAzGalleryApplicationVersion_List : global::System.Manage /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -184,18 +184,23 @@ public partial class GetAzGalleryApplicationVersion_List : global::System.Manage /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionList + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -207,7 +212,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -315,7 +320,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -361,8 +365,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -401,12 +405,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionList + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_Get.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_Get.cs index 2e7442e20e94..606f10889fab 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_Get.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_Get.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzGalleryApplication_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication))] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Description(@"Retrieves information about a gallery Application Definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Generated] public partial class GetAzGalleryApplication_Get : global::System.Management.Automation.PSCmdlet, @@ -82,11 +82,11 @@ public partial class GetAzGalleryApplication_Get : global::System.Management.Aut public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -165,8 +165,8 @@ public partial class GetAzGalleryApplication_Get : global::System.Management.Aut /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -177,18 +177,23 @@ public partial class GetAzGalleryApplication_Get : global::System.Management.Aut /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -200,7 +205,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -308,7 +313,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -354,8 +358,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -394,12 +398,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -411,7 +415,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication WriteObject((await response)); } } diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_GetViaIdentity.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_GetViaIdentity.cs index 91537012ad4f..bb1c8fa5003c 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_GetViaIdentity.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_GetViaIdentity.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzGalleryApplication_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication))] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Description(@"Retrieves information about a gallery Application Definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Generated] public partial class GetAzGalleryApplication_GetViaIdentity : global::System.Management.Automation.PSCmdlet, @@ -74,11 +74,11 @@ public partial class GetAzGalleryApplication_GetViaIdentity : global::System.Man public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -107,8 +107,8 @@ public partial class GetAzGalleryApplication_GetViaIdentity : global::System.Man /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -119,18 +119,23 @@ public partial class GetAzGalleryApplication_GetViaIdentity : global::System.Man /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -142,7 +147,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -250,7 +255,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -317,8 +321,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -357,12 +361,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -374,7 +378,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication WriteObject((await response)); } } diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_List.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_List.cs index 6718c16bfe69..3c75e33996bf 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_List.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_List.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets /// [OpenAPI] ListByGallery=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzGalleryApplication_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication))] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Description(@"List gallery Application Definitions in a gallery.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Generated] public partial class GetAzGalleryApplication_List : global::System.Management.Automation.PSCmdlet, @@ -88,11 +88,11 @@ public partial class GetAzGalleryApplication_List : global::System.Management.Au public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -156,8 +156,8 @@ public partial class GetAzGalleryApplication_List : global::System.Management.Au /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -168,18 +168,23 @@ public partial class GetAzGalleryApplication_List : global::System.Management.Au /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationList + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -191,7 +196,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -299,7 +304,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -345,8 +349,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -385,12 +389,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationList + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_Get.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_Get.cs index 14825f6f7f64..dcde4e531a5c 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_Get.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_Get.cs @@ -94,11 +94,11 @@ public partial class GetAzVMRunCommand_Get : global::System.Management.Automatio public string Location { get => this._location; set => this._location = value; } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -148,8 +148,8 @@ public partial class GetAzVMRunCommand_Get : global::System.Management.Automatio /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocument + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -160,6 +160,11 @@ public partial class GetAzVMRunCommand_Get : global::System.Management.Automatio /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -171,7 +176,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -279,7 +284,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -323,8 +327,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocument + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_Get1.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_Get1.cs index 5f7894b4310f..ac2eb4ed0b04 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_Get1.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_Get1.cs @@ -80,11 +80,11 @@ public partial class GetAzVMRunCommand_Get1 : global::System.Management.Automati public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -176,8 +176,8 @@ public partial class GetAzVMRunCommand_Get1 : global::System.Management.Automati /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -188,8 +188,8 @@ public partial class GetAzVMRunCommand_Get1 : global::System.Management.Automati /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -200,6 +200,11 @@ public partial class GetAzVMRunCommand_Get1 : global::System.Management.Automati /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -211,7 +216,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -319,7 +324,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -365,8 +369,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -405,8 +409,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_GetViaIdentity.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_GetViaIdentity.cs index bcf66d961f6b..f54761ab9fa1 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_GetViaIdentity.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_GetViaIdentity.cs @@ -74,11 +74,11 @@ public partial class GetAzVMRunCommand_GetViaIdentity : global::System.Managemen public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -107,8 +107,8 @@ public partial class GetAzVMRunCommand_GetViaIdentity : global::System.Managemen /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocument + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -119,6 +119,11 @@ public partial class GetAzVMRunCommand_GetViaIdentity : global::System.Managemen /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -130,7 +135,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -238,7 +243,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -299,8 +303,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandDocument + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_List.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_List.cs index d56be1d6bf50..db2c039579f0 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_List.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_List.cs @@ -86,11 +86,11 @@ public partial class GetAzVMRunCommand_List : global::System.Management.Automati public string Location { get => this._location; set => this._location = value; } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -140,8 +140,8 @@ public partial class GetAzVMRunCommand_List : global::System.Management.Automati /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandListResult + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -152,6 +152,11 @@ public partial class GetAzVMRunCommand_List : global::System.Management.Automati /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -163,7 +168,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -271,7 +276,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -315,8 +319,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandListResult + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_List1.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_List1.cs index 3cbe8e3daa37..8d4dcc039ba8 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_List1.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVMRunCommand_List1.cs @@ -86,11 +86,11 @@ public partial class GetAzVMRunCommand_List1 : global::System.Management.Automat public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -168,8 +168,8 @@ public partial class GetAzVMRunCommand_List1 : global::System.Management.Automat /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -180,8 +180,8 @@ public partial class GetAzVMRunCommand_List1 : global::System.Management.Automat /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResult + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -192,6 +192,11 @@ public partial class GetAzVMRunCommand_List1 : global::System.Management.Automat /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -203,7 +208,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -311,7 +316,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -357,8 +361,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -397,8 +401,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResult + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVmssVMRunCommand_Get.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVmssVMRunCommand_Get.cs index 8f7577b86890..62fef40c998b 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVmssVMRunCommand_Get.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVmssVMRunCommand_Get.cs @@ -94,11 +94,11 @@ public partial class GetAzVmssVMRunCommand_Get : global::System.Management.Autom public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -190,8 +190,8 @@ public partial class GetAzVmssVMRunCommand_Get : global::System.Management.Autom /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -202,8 +202,8 @@ public partial class GetAzVmssVMRunCommand_Get : global::System.Management.Autom /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -214,6 +214,11 @@ public partial class GetAzVmssVMRunCommand_Get : global::System.Management.Autom /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -225,7 +230,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -333,7 +338,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -379,8 +383,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -419,8 +423,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVmssVMRunCommand_GetViaIdentity.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVmssVMRunCommand_GetViaIdentity.cs index ff4b07389766..67e10b9c76a3 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVmssVMRunCommand_GetViaIdentity.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVmssVMRunCommand_GetViaIdentity.cs @@ -88,11 +88,11 @@ public partial class GetAzVmssVMRunCommand_GetViaIdentity : global::System.Manag public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -121,8 +121,8 @@ public partial class GetAzVmssVMRunCommand_GetViaIdentity : global::System.Manag /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -133,8 +133,8 @@ public partial class GetAzVmssVMRunCommand_GetViaIdentity : global::System.Manag /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -145,6 +145,11 @@ public partial class GetAzVmssVMRunCommand_GetViaIdentity : global::System.Manag /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -156,7 +161,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -264,7 +269,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -335,8 +339,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -375,8 +379,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVmssVMRunCommand_List.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVmssVMRunCommand_List.cs index 8aa8575d3f7a..146d09c68f8c 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVmssVMRunCommand_List.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzVmssVMRunCommand_List.cs @@ -102,11 +102,11 @@ public partial class GetAzVmssVMRunCommand_List : global::System.Management.Auto public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -184,8 +184,8 @@ public partial class GetAzVmssVMRunCommand_List : global::System.Management.Auto /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -196,8 +196,8 @@ public partial class GetAzVmssVMRunCommand_List : global::System.Management.Auto /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResult + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -208,6 +208,11 @@ public partial class GetAzVmssVMRunCommand_List : global::System.Management.Auto /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -219,7 +224,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -327,7 +332,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -373,8 +377,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -413,8 +417,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommandsListResult + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/NewAzGalleryApplicationVersion_CreateExpanded.cs b/src/Compute/Compute.Autorest/generated/cmdlets/NewAzGalleryApplicationVersion_CreateExpanded.cs index 16e3d35576e7..240c81bb9321 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/NewAzGalleryApplicationVersion_CreateExpanded.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/NewAzGalleryApplicationVersion_CreateExpanded.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzGalleryApplicationVersion_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Description(@"Create or update a gallery Application Version.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Generated] public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::System.Management.Automation.PSCmdlet, @@ -34,6 +34,11 @@ public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::Sys /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// + /// Specifies information about the gallery Application Version that you want to create or update. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion _galleryApplicationVersionBody = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersion(); + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] @@ -47,6 +52,20 @@ public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::Sys /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.Compute.Compute Client => Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.ClientAPI; + /// + /// Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, + /// the config file will be named the Gallery Application name appended with "_config". + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with \"_config\".")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with ""_config"".", + SerializedName = @"configFileName", + PossibleTypes = new [] { typeof(string) })] + public string ConfigFileName { get => _galleryApplicationVersionBody.SettingConfigFileName ?? null; set => _galleryApplicationVersionBody.SettingConfigFileName = value; } + /// /// Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. /// @@ -58,7 +77,7 @@ public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::Sys Description = @"Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob.", SerializedName = @"defaultConfigurationLink", PossibleTypes = new [] { typeof(string) })] - public string DefaultConfigFileLink { get => GalleryApplicationVersionBody.DefaultConfigFileLink ?? null; set => GalleryApplicationVersionBody.DefaultConfigFileLink = value; } + public string DefaultConfigFileLink { get => _galleryApplicationVersionBody.DefaultConfigFileLink ?? null; set => _galleryApplicationVersionBody.DefaultConfigFileLink = value; } /// /// The credentials, account, tenant, and subscription used for communication with Azure @@ -85,14 +104,6 @@ public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Path)] public string GalleryApplicationName { get => this._galleryApplicationName; set => this._galleryApplicationName = value; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion _galleryApplicationVersionBody= new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersion(); - - /// - /// Specifies information about the gallery Application Version that you want to create or update. - /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion GalleryApplicationVersionBody { get => this._galleryApplicationVersionBody; set => this._galleryApplicationVersionBody = value; } - /// Backing field for property. private string _galleryName; @@ -132,7 +143,7 @@ public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::Sys Description = @"Required. The path and arguments to install the gallery application. This is limited to 4096 characters.", SerializedName = @"install", PossibleTypes = new [] { typeof(string) })] - public string Install { get => GalleryApplicationVersionBody.Install ?? null; set => GalleryApplicationVersionBody.Install = value; } + public string Install { get => _galleryApplicationVersionBody.Install ?? null; set => _galleryApplicationVersionBody.Install = value; } /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } @@ -146,14 +157,14 @@ public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::Sys Description = @"Resource location", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] - public string Location { get => GalleryApplicationVersionBody.Location ?? null; set => GalleryApplicationVersionBody.Location = value; } + public string Location { get => _galleryApplicationVersionBody.Location ?? null; set => _galleryApplicationVersionBody.Location = value; } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -191,7 +202,21 @@ public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::Sys Description = @"Required. The mediaLink of the artifact, must be a readable storage page blob.", SerializedName = @"mediaLink", PossibleTypes = new [] { typeof(string) })] - public string PackageFileLink { get => GalleryApplicationVersionBody.PackageFileLink ?? null; set => GalleryApplicationVersionBody.PackageFileLink = value; } + public string PackageFileLink { get => _galleryApplicationVersionBody.PackageFileLink ?? null; set => _galleryApplicationVersionBody.PackageFileLink = value; } + + /// + /// Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, + /// the package file will be named the same as the Gallery Application name. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, the package file will be named the same as the Gallery Application name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, the package file will be named the same as the Gallery Application name.", + SerializedName = @"packageFileName", + PossibleTypes = new [] { typeof(string) })] + public string PackageFileName { get => _galleryApplicationVersionBody.SettingPackageFileName ?? null; set => _galleryApplicationVersionBody.SettingPackageFileName = value; } /// /// The instance of the that the remote call will use. @@ -214,6 +239,21 @@ public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + /// + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only.", + SerializedName = @"advancedSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings PublishingProfileAdvancedSetting { get => _galleryApplicationVersionBody.PublishingProfileAdvancedSetting ?? null /* object */; set => _galleryApplicationVersionBody.PublishingProfileAdvancedSetting = value; } + /// Optional. Whether or not this application reports health. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Whether or not this application reports health.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] @@ -224,7 +264,7 @@ public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::Sys SerializedName = @"enableHealthCheck", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public global::System.Management.Automation.SwitchParameter PublishingProfileEnableHealthCheck { get => GalleryApplicationVersionBody.PublishingProfileEnableHealthCheck ?? default(global::System.Management.Automation.SwitchParameter); set => GalleryApplicationVersionBody.PublishingProfileEnableHealthCheck = value; } + public global::System.Management.Automation.SwitchParameter PublishingProfileEnableHealthCheck { get => _galleryApplicationVersionBody.PublishingProfileEnableHealthCheck ?? default(global::System.Management.Automation.SwitchParameter); set => _galleryApplicationVersionBody.PublishingProfileEnableHealthCheck = value; } /// /// The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property @@ -238,7 +278,7 @@ public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::Sys Description = @"The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable.", SerializedName = @"endOfLifeDate", PossibleTypes = new [] { typeof(global::System.DateTime) })] - public global::System.DateTime PublishingProfileEndOfLifeDate { get => GalleryApplicationVersionBody.PublishingProfileEndOfLifeDate ?? default(global::System.DateTime); set => GalleryApplicationVersionBody.PublishingProfileEndOfLifeDate = value; } + public global::System.DateTime PublishingProfileEndOfLifeDate { get => _galleryApplicationVersionBody.PublishingProfileEndOfLifeDate ?? default(global::System.DateTime); set => _galleryApplicationVersionBody.PublishingProfileEndOfLifeDate = value; } /// /// If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. @@ -251,7 +291,7 @@ public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::Sys Description = @"If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.", SerializedName = @"excludeFromLatest", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] - public global::System.Management.Automation.SwitchParameter PublishingProfileExcludeFromLatest { get => GalleryApplicationVersionBody.PublishingProfileExcludeFromLatest ?? default(global::System.Management.Automation.SwitchParameter); set => GalleryApplicationVersionBody.PublishingProfileExcludeFromLatest = value; } + public global::System.Management.Automation.SwitchParameter PublishingProfileExcludeFromLatest { get => _galleryApplicationVersionBody.PublishingProfileExcludeFromLatest ?? default(global::System.Management.Automation.SwitchParameter); set => _galleryApplicationVersionBody.PublishingProfileExcludeFromLatest = value; } /// /// Optional parameter which specifies the mode to be used for replication. This property is not updatable. @@ -266,7 +306,7 @@ public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::Sys PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode))] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode PublishingProfileReplicationMode { get => GalleryApplicationVersionBody.PublishingProfileReplicationMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); set => GalleryApplicationVersionBody.PublishingProfileReplicationMode = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode PublishingProfileReplicationMode { get => _galleryApplicationVersionBody.PublishingProfileReplicationMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); set => _galleryApplicationVersionBody.PublishingProfileReplicationMode = value; } /// /// Specifies the storage account type to be used to store the image. This property is not updatable. @@ -281,7 +321,22 @@ public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::Sys PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType))] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType PublishingProfileStorageAccountType { get => GalleryApplicationVersionBody.PublishingProfileStorageAccountType ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); set => GalleryApplicationVersionBody.PublishingProfileStorageAccountType = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType PublishingProfileStorageAccountType { get => _galleryApplicationVersionBody.PublishingProfileStorageAccountType ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); set => _galleryApplicationVersionBody.PublishingProfileStorageAccountType = value; } + + /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The target extended locations where the Image Version is going to be replicated to. This property is updatable.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The target extended locations where the Image Version is going to be replicated to. This property is updatable.", + SerializedName = @"targetExtendedLocations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get => _galleryApplicationVersionBody.PublishingProfileTargetExtendedLocation ?? null /* arrayOf */; set => _galleryApplicationVersionBody.PublishingProfileTargetExtendedLocation = value; } /// /// Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. @@ -294,7 +349,7 @@ public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::Sys Description = @"Required. The path and arguments to remove the gallery application. This is limited to 4096 characters.", SerializedName = @"remove", PossibleTypes = new [] { typeof(string) })] - public string Remove { get => GalleryApplicationVersionBody.Remove ?? null; set => GalleryApplicationVersionBody.Remove = value; } + public string Remove { get => _galleryApplicationVersionBody.Remove ?? null; set => _galleryApplicationVersionBody.Remove = value; } /// /// The number of replicas of the Image Version to be created per region. This property would take effect for a region when @@ -308,7 +363,7 @@ public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::Sys Description = @"The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.", SerializedName = @"replicaCount", PossibleTypes = new [] { typeof(int) })] - public int ReplicaCount { get => GalleryApplicationVersionBody.ReplicaCount ?? default(int); set => GalleryApplicationVersionBody.ReplicaCount = value; } + public int ReplicaCount { get => _galleryApplicationVersionBody.ReplicaCount ?? default(int); set => _galleryApplicationVersionBody.ReplicaCount = value; } /// Backing field for property. private string _resourceGroupName; @@ -355,7 +410,7 @@ public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::Sys Description = @"Resource tags", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags Tag { get => GalleryApplicationVersionBody.Tag ?? null /* object */; set => GalleryApplicationVersionBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags Tag { get => _galleryApplicationVersionBody.Tag ?? null /* object */; set => _galleryApplicationVersionBody.Tag = value; } /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. @@ -368,8 +423,8 @@ public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::Sys ReadOnly = false, Description = @"The target regions where the Image Version is going to be replicated to. This property is updatable.", SerializedName = @"targetRegions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion) })] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] TargetRegion { get => GalleryApplicationVersionBody.TargetRegion ?? null /* arrayOf */; set => GalleryApplicationVersionBody.TargetRegion = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion) })] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] TargetRegion { get => _galleryApplicationVersionBody.TargetRegion ?? null /* arrayOf */; set => _galleryApplicationVersionBody.TargetRegion = value; } /// /// Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke @@ -384,15 +439,15 @@ public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::Sys Description = @"Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove command on the previous version and install command on the current version of the gallery application. This is limited to 4096 characters.", SerializedName = @"update", PossibleTypes = new [] { typeof(string) })] - public string Update { get => GalleryApplicationVersionBody.Update ?? null; set => GalleryApplicationVersionBody.Update = value; } + public string Update { get => _galleryApplicationVersionBody.Update ?? null; set => _galleryApplicationVersionBody.Update = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -403,18 +458,23 @@ public partial class NewAzGalleryApplicationVersion_CreateExpanded : global::Sys /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -440,7 +500,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.NewAzGalleryApplicatio clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.GalleryApplicationVersionBody = this.GalleryApplicationVersionBody; + clone._galleryApplicationVersionBody = this._galleryApplicationVersionBody; clone.SubscriptionId = this.SubscriptionId; clone.ResourceGroupName = this.ResourceGroupName; clone.GalleryName = this.GalleryName; @@ -452,7 +512,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.NewAzGalleryApplicatio /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -593,7 +653,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -608,12 +667,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.GalleryApplicationVersionsCreateOrUpdate(SubscriptionId, ResourceGroupName, GalleryName, GalleryApplicationName, Name, GalleryApplicationVersionBody, onOk, onDefault, this, Pipeline); + await this.Client.GalleryApplicationVersionsCreateOrUpdate(SubscriptionId, ResourceGroupName, GalleryName, GalleryApplicationName, Name, _galleryApplicationVersionBody, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,GalleryName=GalleryName,GalleryApplicationName=GalleryApplicationName,Name=Name,body=GalleryApplicationVersionBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,GalleryName=GalleryName,GalleryApplicationName=GalleryApplicationName,Name=Name,body=_galleryApplicationVersionBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -636,8 +695,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -659,14 +718,14 @@ protected override void StopProcessing() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, GalleryName=GalleryName, GalleryApplicationName=GalleryApplicationName, Name=Name, body=GalleryApplicationVersionBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, GalleryName=GalleryName, GalleryApplicationName=GalleryApplicationName, Name=Name, body=_galleryApplicationVersionBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, GalleryName=GalleryName, GalleryApplicationName=GalleryApplicationName, Name=Name, body=GalleryApplicationVersionBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, GalleryName=GalleryName, GalleryApplicationName=GalleryApplicationName, Name=Name, body=_galleryApplicationVersionBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -676,12 +735,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -693,7 +752,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion WriteObject((await response)); } } diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/NewAzGalleryApplication_CreateExpanded.cs b/src/Compute/Compute.Autorest/generated/cmdlets/NewAzGalleryApplication_CreateExpanded.cs index 2ce7000092e0..00c51461bbbd 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/NewAzGalleryApplication_CreateExpanded.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/NewAzGalleryApplication_CreateExpanded.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzGalleryApplication_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication))] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Description(@"Create or update a gallery Application Definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Generated] public partial class NewAzGalleryApplication_CreateExpanded : global::System.Management.Automation.PSCmdlet, @@ -34,6 +34,11 @@ public partial class NewAzGalleryApplication_CreateExpanded : global::System.Man /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// + /// Specifies information about the gallery Application Definition that you want to create or update. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication _galleryApplicationBody = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplication(); + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] @@ -67,7 +72,7 @@ public partial class NewAzGalleryApplication_CreateExpanded : global::System.Man Description = @"The description of this gallery Application Definition resource. This property is updatable.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] - public string Description { get => GalleryApplicationBody.Description ?? null; set => GalleryApplicationBody.Description = value; } + public string Description { get => _galleryApplicationBody.Description ?? null; set => _galleryApplicationBody.Description = value; } /// /// The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This @@ -82,7 +87,7 @@ public partial class NewAzGalleryApplication_CreateExpanded : global::System.Man SerializedName = @"endOfLifeDate", PossibleTypes = new [] { typeof(global::System.DateTime) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public global::System.DateTime EndOfLifeDate { get => GalleryApplicationBody.EndOfLifeDate ?? default(global::System.DateTime); set => GalleryApplicationBody.EndOfLifeDate = value; } + public global::System.DateTime EndOfLifeDate { get => _galleryApplicationBody.EndOfLifeDate ?? default(global::System.DateTime); set => _galleryApplicationBody.EndOfLifeDate = value; } /// The Eula agreement for the gallery Application Definition. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Eula agreement for the gallery Application Definition.")] @@ -94,15 +99,7 @@ public partial class NewAzGalleryApplication_CreateExpanded : global::System.Man SerializedName = @"eula", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public string Eula { get => GalleryApplicationBody.Eula ?? null; set => GalleryApplicationBody.Eula = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication _galleryApplicationBody= new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplication(); - - /// - /// Specifies information about the gallery Application Definition that you want to create or update. - /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication GalleryApplicationBody { get => this._galleryApplicationBody; set => this._galleryApplicationBody = value; } + public string Eula { get => _galleryApplicationBody.Eula ?? null; set => _galleryApplicationBody.Eula = value; } /// Backing field for property. private string _galleryName; @@ -144,14 +141,14 @@ public partial class NewAzGalleryApplication_CreateExpanded : global::System.Man Description = @"Resource location", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] - public string Location { get => GalleryApplicationBody.Location ?? null; set => GalleryApplicationBody.Location = value; } + public string Location { get => _galleryApplicationBody.Location ?? null; set => _galleryApplicationBody.Location = value; } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -195,7 +192,7 @@ public partial class NewAzGalleryApplication_CreateExpanded : global::System.Man SerializedName = @"privacyStatementUri", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public string PrivacyStatementUri { get => GalleryApplicationBody.PrivacyStatementUri ?? null; set => GalleryApplicationBody.PrivacyStatementUri = value; } + public string PrivacyStatementUri { get => _galleryApplicationBody.PrivacyStatementUri ?? null; set => _galleryApplicationBody.PrivacyStatementUri = value; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -223,7 +220,7 @@ public partial class NewAzGalleryApplication_CreateExpanded : global::System.Man SerializedName = @"releaseNoteUri", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public string ReleaseNoteUri { get => GalleryApplicationBody.ReleaseNoteUri ?? null; set => GalleryApplicationBody.ReleaseNoteUri = value; } + public string ReleaseNoteUri { get => _galleryApplicationBody.ReleaseNoteUri ?? null; set => _galleryApplicationBody.ReleaseNoteUri = value; } /// Backing field for property. private string _resourceGroupName; @@ -273,7 +270,7 @@ public partial class NewAzGalleryApplication_CreateExpanded : global::System.Man SerializedName = @"supportedOSType", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) })] [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes))] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes SupportedOSType { get => GalleryApplicationBody.SupportedOSType ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes)""); set => GalleryApplicationBody.SupportedOSType = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes SupportedOSType { get => _galleryApplicationBody.SupportedOSType ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes)""); set => _galleryApplicationBody.SupportedOSType = value; } /// Resource tags [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ExportAs(typeof(global::System.Collections.Hashtable))] @@ -285,15 +282,15 @@ public partial class NewAzGalleryApplication_CreateExpanded : global::System.Man Description = @"Resource tags", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags Tag { get => GalleryApplicationBody.Tag ?? null /* object */; set => GalleryApplicationBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags Tag { get => _galleryApplicationBody.Tag ?? null /* object */; set => _galleryApplicationBody.Tag = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -304,18 +301,23 @@ public partial class NewAzGalleryApplication_CreateExpanded : global::System.Man /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -341,7 +343,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.NewAzGalleryApplicatio clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.GalleryApplicationBody = this.GalleryApplicationBody; + clone._galleryApplicationBody = this._galleryApplicationBody; clone.SubscriptionId = this.SubscriptionId; clone.ResourceGroupName = this.ResourceGroupName; clone.GalleryName = this.GalleryName; @@ -352,7 +354,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.NewAzGalleryApplicatio /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -493,7 +495,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -508,12 +509,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.GalleryApplicationsCreateOrUpdate(SubscriptionId, ResourceGroupName, GalleryName, Name, GalleryApplicationBody, onOk, onDefault, this, Pipeline); + await this.Client.GalleryApplicationsCreateOrUpdate(SubscriptionId, ResourceGroupName, GalleryName, Name, _galleryApplicationBody, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,GalleryName=GalleryName,Name=Name,body=GalleryApplicationBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,GalleryName=GalleryName,Name=Name,body=_galleryApplicationBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -536,8 +537,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -559,14 +560,14 @@ protected override void StopProcessing() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, GalleryName=GalleryName, Name=Name, body=GalleryApplicationBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, GalleryName=GalleryName, Name=Name, body=_galleryApplicationBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, GalleryName=GalleryName, Name=Name, body=GalleryApplicationBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, GalleryName=GalleryName, Name=Name, body=_galleryApplicationBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -576,12 +577,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -593,7 +594,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication WriteObject((await response)); } } diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplicationVersion_Delete.cs b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplicationVersion_Delete.cs index 4a5f6ede2179..cee179927d15 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplicationVersion_Delete.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplicationVersion_Delete.cs @@ -103,11 +103,11 @@ public partial class RemoveAzGalleryApplicationVersion_Delete : global::System.M public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -201,8 +201,8 @@ public partial class RemoveAzGalleryApplicationVersion_Delete : global::System.M /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -233,6 +233,11 @@ public partial class RemoveAzGalleryApplicationVersion_Delete : global::System.M /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -269,7 +274,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.RemoveAzGalleryApplica /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -402,7 +407,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -453,8 +457,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplicationVersion_DeleteViaIdentity.cs b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplicationVersion_DeleteViaIdentity.cs index f388a937306b..b1cba54be33b 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplicationVersion_DeleteViaIdentity.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplicationVersion_DeleteViaIdentity.cs @@ -79,11 +79,11 @@ public partial class RemoveAzGalleryApplicationVersion_DeleteViaIdentity : globa public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -127,8 +127,8 @@ public partial class RemoveAzGalleryApplicationVersion_DeleteViaIdentity : globa /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -159,6 +159,11 @@ public partial class RemoveAzGalleryApplicationVersion_DeleteViaIdentity : globa /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -190,7 +195,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.RemoveAzGalleryApplica /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -323,7 +328,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -402,8 +406,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplication_Delete.cs b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplication_Delete.cs index 30a159075f23..54c7eda6442b 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplication_Delete.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplication_Delete.cs @@ -87,11 +87,11 @@ public partial class RemoveAzGalleryApplication_Delete : global::System.Manageme public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -185,8 +185,8 @@ public partial class RemoveAzGalleryApplication_Delete : global::System.Manageme /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -217,6 +217,11 @@ public partial class RemoveAzGalleryApplication_Delete : global::System.Manageme /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -252,7 +257,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.RemoveAzGalleryApplica /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -385,7 +390,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -436,8 +440,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplication_DeleteViaIdentity.cs b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplication_DeleteViaIdentity.cs index ef45dacf1e4c..89c457c1a75e 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplication_DeleteViaIdentity.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplication_DeleteViaIdentity.cs @@ -79,11 +79,11 @@ public partial class RemoveAzGalleryApplication_DeleteViaIdentity : global::Syst public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -127,8 +127,8 @@ public partial class RemoveAzGalleryApplication_DeleteViaIdentity : global::Syst /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -159,6 +159,11 @@ public partial class RemoveAzGalleryApplication_DeleteViaIdentity : global::Syst /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -190,7 +195,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.RemoveAzGalleryApplica /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -323,7 +328,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -398,8 +402,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVMRunCommand_Delete.cs b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVMRunCommand_Delete.cs index 731ed4716dbd..3b251b0a83f7 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVMRunCommand_Delete.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVMRunCommand_Delete.cs @@ -71,11 +71,11 @@ public partial class RemoveAzVMRunCommand_Delete : global::System.Management.Aut public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -182,8 +182,8 @@ public partial class RemoveAzVMRunCommand_Delete : global::System.Management.Aut /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -214,6 +214,11 @@ public partial class RemoveAzVMRunCommand_Delete : global::System.Management.Aut /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -249,7 +254,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.RemoveAzVMRunCommand_D /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -382,7 +387,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -433,8 +437,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVMRunCommand_DeleteViaIdentity.cs b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVMRunCommand_DeleteViaIdentity.cs index f0022ae501f9..f3630f672949 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVMRunCommand_DeleteViaIdentity.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVMRunCommand_DeleteViaIdentity.cs @@ -79,11 +79,11 @@ public partial class RemoveAzVMRunCommand_DeleteViaIdentity : global::System.Man public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -127,8 +127,8 @@ public partial class RemoveAzVMRunCommand_DeleteViaIdentity : global::System.Man /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -159,6 +159,11 @@ public partial class RemoveAzVMRunCommand_DeleteViaIdentity : global::System.Man /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -190,7 +195,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.RemoveAzVMRunCommand_D /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -323,7 +328,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -398,8 +402,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVmssVMRunCommand_Delete.cs b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVmssVMRunCommand_Delete.cs index a56c4f021c95..540f4c73fbbb 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVmssVMRunCommand_Delete.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVmssVMRunCommand_Delete.cs @@ -85,11 +85,11 @@ public partial class RemoveAzVmssVMRunCommand_Delete : global::System.Management public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -196,8 +196,8 @@ public partial class RemoveAzVmssVMRunCommand_Delete : global::System.Management /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -228,6 +228,11 @@ public partial class RemoveAzVmssVMRunCommand_Delete : global::System.Management /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -264,7 +269,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.RemoveAzVmssVMRunComma /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -397,7 +402,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -448,8 +452,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVmssVMRunCommand_DeleteViaIdentity.cs b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVmssVMRunCommand_DeleteViaIdentity.cs index 679011d4fdaf..3a4f555fa370 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVmssVMRunCommand_DeleteViaIdentity.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVmssVMRunCommand_DeleteViaIdentity.cs @@ -79,11 +79,11 @@ public partial class RemoveAzVmssVMRunCommand_DeleteViaIdentity : global::System public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -127,8 +127,8 @@ public partial class RemoveAzVmssVMRunCommand_DeleteViaIdentity : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -159,6 +159,11 @@ public partial class RemoveAzVmssVMRunCommand_DeleteViaIdentity : global::System /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -190,7 +195,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.RemoveAzVmssVMRunComma /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -323,7 +328,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -402,8 +406,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/SetAzVMRunCommand_UpdateExpanded.cs b/src/Compute/Compute.Autorest/generated/cmdlets/SetAzVMRunCommand_UpdateExpanded.cs index 76db1009814c..fac716077f50 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/SetAzVMRunCommand_UpdateExpanded.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/SetAzVMRunCommand_UpdateExpanded.cs @@ -33,6 +33,9 @@ public partial class SetAzVMRunCommand_UpdateExpanded : global::System.Managemen /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// Describes a Virtual Machine run command. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand _runCommandBody = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommand(); + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] @@ -49,7 +52,7 @@ public partial class SetAzVMRunCommand_UpdateExpanded : global::System.Managemen Description = @"Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.", SerializedName = @"asyncExecution", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] - public global::System.Management.Automation.SwitchParameter AsyncExecution { get => RunCommandBody.AsyncExecution ?? default(global::System.Management.Automation.SwitchParameter); set => RunCommandBody.AsyncExecution = value; } + public global::System.Management.Automation.SwitchParameter AsyncExecution { get => _runCommandBody.AsyncExecution ?? default(global::System.Management.Automation.SwitchParameter); set => _runCommandBody.AsyncExecution = value; } /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] @@ -77,7 +80,7 @@ public partial class SetAzVMRunCommand_UpdateExpanded : global::System.Managemen Description = @"Specifies the Azure storage blob where script error stream will be uploaded.", SerializedName = @"errorBlobUri", PossibleTypes = new [] { typeof(string) })] - public string ErrorBlobUri { get => RunCommandBody.ErrorBlobUri ?? null; set => RunCommandBody.ErrorBlobUri = value; } + public string ErrorBlobUri { get => _runCommandBody.ErrorBlobUri ?? null; set => _runCommandBody.ErrorBlobUri = value; } /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] @@ -103,14 +106,14 @@ public partial class SetAzVMRunCommand_UpdateExpanded : global::System.Managemen Description = @"Resource location", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] - public string Location { get => RunCommandBody.Location ?? null; set => RunCommandBody.Location = value; } + public string Location { get => _runCommandBody.Location ?? null; set => _runCommandBody.Location = value; } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -130,7 +133,7 @@ public partial class SetAzVMRunCommand_UpdateExpanded : global::System.Managemen Description = @"Specifies the Azure storage blob where script output stream will be uploaded.", SerializedName = @"outputBlobUri", PossibleTypes = new [] { typeof(string) })] - public string OutputBlobUri { get => RunCommandBody.OutputBlobUri ?? null; set => RunCommandBody.OutputBlobUri = value; } + public string OutputBlobUri { get => _runCommandBody.OutputBlobUri ?? null; set => _runCommandBody.OutputBlobUri = value; } /// The parameters used by the script. [global::System.Management.Automation.AllowEmptyCollection] @@ -142,7 +145,7 @@ public partial class SetAzVMRunCommand_UpdateExpanded : global::System.Managemen Description = @"The parameters used by the script.", SerializedName = @"parameters", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter) })] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[] Parameter { get => RunCommandBody.Parameter ?? null /* arrayOf */; set => RunCommandBody.Parameter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[] Parameter { get => _runCommandBody.Parameter ?? null /* arrayOf */; set => _runCommandBody.Parameter = value; } /// /// The instance of the that the remote call will use. @@ -159,7 +162,7 @@ public partial class SetAzVMRunCommand_UpdateExpanded : global::System.Managemen Description = @"The parameters used by the script.", SerializedName = @"protectedParameters", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter) })] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[] ProtectedParameter { get => RunCommandBody.ProtectedParameter ?? null /* arrayOf */; set => RunCommandBody.ProtectedParameter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[] ProtectedParameter { get => _runCommandBody.ProtectedParameter ?? null /* arrayOf */; set => _runCommandBody.ProtectedParameter = value; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -200,7 +203,7 @@ public partial class SetAzVMRunCommand_UpdateExpanded : global::System.Managemen Description = @"Specifies the user account password on the VM when executing the run command.", SerializedName = @"runAsPassword", PossibleTypes = new [] { typeof(string) })] - public string RunAsPassword { get => RunCommandBody.RunAsPassword ?? null; set => RunCommandBody.RunAsPassword = value; } + public string RunAsPassword { get => _runCommandBody.RunAsPassword ?? null; set => _runCommandBody.RunAsPassword = value; } /// Specifies the user account on the VM when executing the run command. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the user account on the VM when executing the run command.")] @@ -211,13 +214,7 @@ public partial class SetAzVMRunCommand_UpdateExpanded : global::System.Managemen Description = @"Specifies the user account on the VM when executing the run command.", SerializedName = @"runAsUser", PossibleTypes = new [] { typeof(string) })] - public string RunAsUser { get => RunCommandBody.RunAsUser ?? null; set => RunCommandBody.RunAsUser = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand _runCommandBody= new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommand(); - - /// Describes a Virtual Machine run command. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand RunCommandBody { get => this._runCommandBody; set => this._runCommandBody = value; } + public string RunAsUser { get => _runCommandBody.RunAsUser ?? null; set => _runCommandBody.RunAsUser = value; } /// Backing field for property. private string _runCommandName; @@ -242,7 +239,7 @@ public partial class SetAzVMRunCommand_UpdateExpanded : global::System.Managemen Description = @"Specifies a commandId of predefined built-in script.", SerializedName = @"commandId", PossibleTypes = new [] { typeof(string) })] - public string SourceCommandId { get => RunCommandBody.SourceCommandId ?? null; set => RunCommandBody.SourceCommandId = value; } + public string SourceCommandId { get => _runCommandBody.SourceCommandId ?? null; set => _runCommandBody.SourceCommandId = value; } /// Specifies the script content to be executed on the VM. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the script content to be executed on the VM.")] @@ -253,7 +250,7 @@ public partial class SetAzVMRunCommand_UpdateExpanded : global::System.Managemen Description = @"Specifies the script content to be executed on the VM.", SerializedName = @"script", PossibleTypes = new [] { typeof(string) })] - public string SourceScript { get => RunCommandBody.SourceScript ?? null; set => RunCommandBody.SourceScript = value; } + public string SourceScript { get => _runCommandBody.SourceScript ?? null; set => _runCommandBody.SourceScript = value; } /// Specifies the script download location. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the script download location.")] @@ -264,7 +261,7 @@ public partial class SetAzVMRunCommand_UpdateExpanded : global::System.Managemen Description = @"Specifies the script download location.", SerializedName = @"scriptUri", PossibleTypes = new [] { typeof(string) })] - public string SourceScriptUri { get => RunCommandBody.SourceScriptUri ?? null; set => RunCommandBody.SourceScriptUri = value; } + public string SourceScriptUri { get => _runCommandBody.SourceScriptUri ?? null; set => _runCommandBody.SourceScriptUri = value; } /// Backing field for property. private string _subscriptionId; @@ -297,7 +294,7 @@ public partial class SetAzVMRunCommand_UpdateExpanded : global::System.Managemen Description = @"Resource tags", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags Tag { get => RunCommandBody.Tag ?? null /* object */; set => RunCommandBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags Tag { get => _runCommandBody.Tag ?? null /* object */; set => _runCommandBody.Tag = value; } /// The timeout in seconds to execute the run command. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The timeout in seconds to execute the run command.")] @@ -308,7 +305,7 @@ public partial class SetAzVMRunCommand_UpdateExpanded : global::System.Managemen Description = @"The timeout in seconds to execute the run command.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(int) })] - public int TimeoutInSecond { get => RunCommandBody.TimeoutInSecond ?? default(int); set => RunCommandBody.TimeoutInSecond = value; } + public int TimeoutInSecond { get => _runCommandBody.TimeoutInSecond ?? default(int); set => _runCommandBody.TimeoutInSecond = value; } /// Backing field for property. private string _vMName; @@ -331,8 +328,8 @@ public partial class SetAzVMRunCommand_UpdateExpanded : global::System.Managemen /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -343,8 +340,8 @@ public partial class SetAzVMRunCommand_UpdateExpanded : global::System.Managemen /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -355,6 +352,11 @@ public partial class SetAzVMRunCommand_UpdateExpanded : global::System.Managemen /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -380,7 +382,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.SetAzVMRunCommand_Upda clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.RunCommandBody = this.RunCommandBody; + clone._runCommandBody = this._runCommandBody; clone.ResourceGroupName = this.ResourceGroupName; clone.VMName = this.VMName; clone.RunCommandName = this.RunCommandName; @@ -391,7 +393,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.SetAzVMRunCommand_Upda /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -524,7 +526,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -539,12 +540,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.VirtualMachineRunCommandsCreateOrUpdate(ResourceGroupName, VMName, RunCommandName, SubscriptionId, RunCommandBody, onOk, onDefault, this, Pipeline); + await this.Client.VirtualMachineRunCommandsCreateOrUpdate(ResourceGroupName, VMName, RunCommandName, SubscriptionId, _runCommandBody, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,VMName=VMName,RunCommandName=RunCommandName,SubscriptionId=SubscriptionId,body=RunCommandBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,VMName=VMName,RunCommandName=RunCommandName,SubscriptionId=SubscriptionId,body=_runCommandBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -575,8 +576,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -598,14 +599,14 @@ protected override void StopProcessing() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, VMName=VMName, RunCommandName=RunCommandName, SubscriptionId=SubscriptionId, body=RunCommandBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, VMName=VMName, RunCommandName=RunCommandName, SubscriptionId=SubscriptionId, body=_runCommandBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, VMName=VMName, RunCommandName=RunCommandName, SubscriptionId=SubscriptionId, body=RunCommandBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, VMName=VMName, RunCommandName=RunCommandName, SubscriptionId=SubscriptionId, body=_runCommandBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -615,8 +616,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/SetAzVmssVMRunCommand_UpdateExpanded.cs b/src/Compute/Compute.Autorest/generated/cmdlets/SetAzVmssVMRunCommand_UpdateExpanded.cs index 3c3f6b4b5a96..62bb2fe081d4 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/SetAzVmssVMRunCommand_UpdateExpanded.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/SetAzVmssVMRunCommand_UpdateExpanded.cs @@ -33,6 +33,9 @@ public partial class SetAzVmssVMRunCommand_UpdateExpanded : global::System.Manag /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// Describes a Virtual Machine run command. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand _runCommandBody = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommand(); + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] @@ -49,7 +52,7 @@ public partial class SetAzVmssVMRunCommand_UpdateExpanded : global::System.Manag Description = @"Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.", SerializedName = @"asyncExecution", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] - public global::System.Management.Automation.SwitchParameter AsyncExecution { get => RunCommandBody.AsyncExecution ?? default(global::System.Management.Automation.SwitchParameter); set => RunCommandBody.AsyncExecution = value; } + public global::System.Management.Automation.SwitchParameter AsyncExecution { get => _runCommandBody.AsyncExecution ?? default(global::System.Management.Automation.SwitchParameter); set => _runCommandBody.AsyncExecution = value; } /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] @@ -77,7 +80,7 @@ public partial class SetAzVmssVMRunCommand_UpdateExpanded : global::System.Manag Description = @"Specifies the Azure storage blob where script error stream will be uploaded.", SerializedName = @"errorBlobUri", PossibleTypes = new [] { typeof(string) })] - public string ErrorBlobUri { get => RunCommandBody.ErrorBlobUri ?? null; set => RunCommandBody.ErrorBlobUri = value; } + public string ErrorBlobUri { get => _runCommandBody.ErrorBlobUri ?? null; set => _runCommandBody.ErrorBlobUri = value; } /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] @@ -117,14 +120,14 @@ public partial class SetAzVmssVMRunCommand_UpdateExpanded : global::System.Manag Description = @"Resource location", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] - public string Location { get => RunCommandBody.Location ?? null; set => RunCommandBody.Location = value; } + public string Location { get => _runCommandBody.Location ?? null; set => _runCommandBody.Location = value; } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -144,7 +147,7 @@ public partial class SetAzVmssVMRunCommand_UpdateExpanded : global::System.Manag Description = @"Specifies the Azure storage blob where script output stream will be uploaded.", SerializedName = @"outputBlobUri", PossibleTypes = new [] { typeof(string) })] - public string OutputBlobUri { get => RunCommandBody.OutputBlobUri ?? null; set => RunCommandBody.OutputBlobUri = value; } + public string OutputBlobUri { get => _runCommandBody.OutputBlobUri ?? null; set => _runCommandBody.OutputBlobUri = value; } /// The parameters used by the script. [global::System.Management.Automation.AllowEmptyCollection] @@ -156,7 +159,7 @@ public partial class SetAzVmssVMRunCommand_UpdateExpanded : global::System.Manag Description = @"The parameters used by the script.", SerializedName = @"parameters", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter) })] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[] Parameter { get => RunCommandBody.Parameter ?? null /* arrayOf */; set => RunCommandBody.Parameter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[] Parameter { get => _runCommandBody.Parameter ?? null /* arrayOf */; set => _runCommandBody.Parameter = value; } /// /// The instance of the that the remote call will use. @@ -173,7 +176,7 @@ public partial class SetAzVmssVMRunCommand_UpdateExpanded : global::System.Manag Description = @"The parameters used by the script.", SerializedName = @"protectedParameters", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter) })] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[] ProtectedParameter { get => RunCommandBody.ProtectedParameter ?? null /* arrayOf */; set => RunCommandBody.ProtectedParameter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IRunCommandInputParameter[] ProtectedParameter { get => _runCommandBody.ProtectedParameter ?? null /* arrayOf */; set => _runCommandBody.ProtectedParameter = value; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -214,7 +217,7 @@ public partial class SetAzVmssVMRunCommand_UpdateExpanded : global::System.Manag Description = @"Specifies the user account password on the VM when executing the run command.", SerializedName = @"runAsPassword", PossibleTypes = new [] { typeof(string) })] - public string RunAsPassword { get => RunCommandBody.RunAsPassword ?? null; set => RunCommandBody.RunAsPassword = value; } + public string RunAsPassword { get => _runCommandBody.RunAsPassword ?? null; set => _runCommandBody.RunAsPassword = value; } /// Specifies the user account on the VM when executing the run command. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the user account on the VM when executing the run command.")] @@ -225,13 +228,7 @@ public partial class SetAzVmssVMRunCommand_UpdateExpanded : global::System.Manag Description = @"Specifies the user account on the VM when executing the run command.", SerializedName = @"runAsUser", PossibleTypes = new [] { typeof(string) })] - public string RunAsUser { get => RunCommandBody.RunAsUser ?? null; set => RunCommandBody.RunAsUser = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand _runCommandBody= new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.VirtualMachineRunCommand(); - - /// Describes a Virtual Machine run command. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand RunCommandBody { get => this._runCommandBody; set => this._runCommandBody = value; } + public string RunAsUser { get => _runCommandBody.RunAsUser ?? null; set => _runCommandBody.RunAsUser = value; } /// Backing field for property. private string _runCommandName; @@ -256,7 +253,7 @@ public partial class SetAzVmssVMRunCommand_UpdateExpanded : global::System.Manag Description = @"Specifies a commandId of predefined built-in script.", SerializedName = @"commandId", PossibleTypes = new [] { typeof(string) })] - public string SourceCommandId { get => RunCommandBody.SourceCommandId ?? null; set => RunCommandBody.SourceCommandId = value; } + public string SourceCommandId { get => _runCommandBody.SourceCommandId ?? null; set => _runCommandBody.SourceCommandId = value; } /// Specifies the script content to be executed on the VM. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the script content to be executed on the VM.")] @@ -267,7 +264,7 @@ public partial class SetAzVmssVMRunCommand_UpdateExpanded : global::System.Manag Description = @"Specifies the script content to be executed on the VM.", SerializedName = @"script", PossibleTypes = new [] { typeof(string) })] - public string SourceScript { get => RunCommandBody.SourceScript ?? null; set => RunCommandBody.SourceScript = value; } + public string SourceScript { get => _runCommandBody.SourceScript ?? null; set => _runCommandBody.SourceScript = value; } /// Specifies the script download location. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the script download location.")] @@ -278,7 +275,7 @@ public partial class SetAzVmssVMRunCommand_UpdateExpanded : global::System.Manag Description = @"Specifies the script download location.", SerializedName = @"scriptUri", PossibleTypes = new [] { typeof(string) })] - public string SourceScriptUri { get => RunCommandBody.SourceScriptUri ?? null; set => RunCommandBody.SourceScriptUri = value; } + public string SourceScriptUri { get => _runCommandBody.SourceScriptUri ?? null; set => _runCommandBody.SourceScriptUri = value; } /// Backing field for property. private string _subscriptionId; @@ -311,7 +308,7 @@ public partial class SetAzVmssVMRunCommand_UpdateExpanded : global::System.Manag Description = @"Resource tags", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags Tag { get => RunCommandBody.Tag ?? null /* object */; set => RunCommandBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IResourceTags Tag { get => _runCommandBody.Tag ?? null /* object */; set => _runCommandBody.Tag = value; } /// The timeout in seconds to execute the run command. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The timeout in seconds to execute the run command.")] @@ -322,7 +319,7 @@ public partial class SetAzVmssVMRunCommand_UpdateExpanded : global::System.Manag Description = @"The timeout in seconds to execute the run command.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(int) })] - public int TimeoutInSecond { get => RunCommandBody.TimeoutInSecond ?? default(int); set => RunCommandBody.TimeoutInSecond = value; } + public int TimeoutInSecond { get => _runCommandBody.TimeoutInSecond ?? default(int); set => _runCommandBody.TimeoutInSecond = value; } /// Backing field for property. private string _vMScaleSetName; @@ -343,8 +340,8 @@ public partial class SetAzVmssVMRunCommand_UpdateExpanded : global::System.Manag /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -355,8 +352,8 @@ public partial class SetAzVmssVMRunCommand_UpdateExpanded : global::System.Manag /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -367,6 +364,11 @@ public partial class SetAzVmssVMRunCommand_UpdateExpanded : global::System.Manag /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -392,7 +394,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.SetAzVmssVMRunCommand_ clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.RunCommandBody = this.RunCommandBody; + clone._runCommandBody = this._runCommandBody; clone.ResourceGroupName = this.ResourceGroupName; clone.VMScaleSetName = this.VMScaleSetName; clone.InstanceId = this.InstanceId; @@ -404,7 +406,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.SetAzVmssVMRunCommand_ /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -537,7 +539,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -552,12 +553,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.VirtualMachineScaleSetVMRunCommandsCreateOrUpdate(ResourceGroupName, VMScaleSetName, InstanceId, RunCommandName, SubscriptionId, RunCommandBody, onOk, onDefault, this, Pipeline); + await this.Client.VirtualMachineScaleSetVMRunCommandsCreateOrUpdate(ResourceGroupName, VMScaleSetName, InstanceId, RunCommandName, SubscriptionId, _runCommandBody, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,VMScaleSetName=VMScaleSetName,InstanceId=InstanceId,RunCommandName=RunCommandName,SubscriptionId=SubscriptionId,body=RunCommandBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,VMScaleSetName=VMScaleSetName,InstanceId=InstanceId,RunCommandName=RunCommandName,SubscriptionId=SubscriptionId,body=_runCommandBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -588,8 +589,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -611,14 +612,14 @@ protected override void StopProcessing() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, VMScaleSetName=VMScaleSetName, InstanceId=InstanceId, RunCommandName=RunCommandName, SubscriptionId=SubscriptionId, body=RunCommandBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, VMScaleSetName=VMScaleSetName, InstanceId=InstanceId, RunCommandName=RunCommandName, SubscriptionId=SubscriptionId, body=_runCommandBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, VMScaleSetName=VMScaleSetName, InstanceId=InstanceId, RunCommandName=RunCommandName, SubscriptionId=SubscriptionId, body=RunCommandBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, VMScaleSetName=VMScaleSetName, InstanceId=InstanceId, RunCommandName=RunCommandName, SubscriptionId=SubscriptionId, body=_runCommandBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -628,8 +629,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplicationVersion_UpdateExpanded.cs b/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplicationVersion_UpdateExpanded.cs index e3b299f1673e..21feca96cdc1 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplicationVersion_UpdateExpanded.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplicationVersion_UpdateExpanded.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzGalleryApplicationVersion_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Description(@"Update a gallery Application Version.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Generated] public partial class UpdateAzGalleryApplicationVersion_UpdateExpanded : global::System.Management.Automation.PSCmdlet, @@ -34,6 +34,11 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateExpanded : global:: /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// + /// Specifies information about the gallery Application Version that you want to update. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate _galleryApplicationVersionBody = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionUpdate(); + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] @@ -47,6 +52,20 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateExpanded : global:: /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.Compute.Compute Client => Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.ClientAPI; + /// + /// Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, + /// the config file will be named the Gallery Application name appended with "_config". + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with \"_config\".")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with ""_config"".", + SerializedName = @"configFileName", + PossibleTypes = new [] { typeof(string) })] + public string ConfigFileName { get => _galleryApplicationVersionBody.SettingConfigFileName ?? null; set => _galleryApplicationVersionBody.SettingConfigFileName = value; } + /// /// Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. /// @@ -58,7 +77,7 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateExpanded : global:: Description = @"Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob.", SerializedName = @"defaultConfigurationLink", PossibleTypes = new [] { typeof(string) })] - public string DefaultConfigFileLink { get => GalleryApplicationVersionBody.DefaultConfigFileLink ?? null; set => GalleryApplicationVersionBody.DefaultConfigFileLink = value; } + public string DefaultConfigFileLink { get => _galleryApplicationVersionBody.DefaultConfigFileLink ?? null; set => _galleryApplicationVersionBody.DefaultConfigFileLink = value; } /// /// The credentials, account, tenant, and subscription used for communication with Azure @@ -85,14 +104,6 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateExpanded : global:: [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Path)] public string GalleryApplicationName { get => this._galleryApplicationName; set => this._galleryApplicationName = value; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdate _galleryApplicationVersionBody= new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionUpdate(); - - /// - /// Specifies information about the gallery Application Version that you want to update. - /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdate GalleryApplicationVersionBody { get => this._galleryApplicationVersionBody; set => this._galleryApplicationVersionBody = value; } - /// Backing field for property. private string _galleryName; @@ -133,17 +144,17 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateExpanded : global:: SerializedName = @"install", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public string Install { get => GalleryApplicationVersionBody.Install ?? null; set => GalleryApplicationVersionBody.Install = value; } + public string Install { get => _galleryApplicationVersionBody.Install ?? null; set => _galleryApplicationVersionBody.Install = value; } /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -181,7 +192,21 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateExpanded : global:: Description = @"Required. The mediaLink of the artifact, must be a readable storage page blob.", SerializedName = @"mediaLink", PossibleTypes = new [] { typeof(string) })] - public string PackageFileLink { get => GalleryApplicationVersionBody.PackageFileLink ?? null; set => GalleryApplicationVersionBody.PackageFileLink = value; } + public string PackageFileLink { get => _galleryApplicationVersionBody.PackageFileLink ?? null; set => _galleryApplicationVersionBody.PackageFileLink = value; } + + /// + /// Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, + /// the package file will be named the same as the Gallery Application name. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, the package file will be named the same as the Gallery Application name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, the package file will be named the same as the Gallery Application name.", + SerializedName = @"packageFileName", + PossibleTypes = new [] { typeof(string) })] + public string PackageFileName { get => _galleryApplicationVersionBody.SettingPackageFileName ?? null; set => _galleryApplicationVersionBody.SettingPackageFileName = value; } /// /// The instance of the that the remote call will use. @@ -204,6 +229,21 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateExpanded : global:: [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + /// + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only.", + SerializedName = @"advancedSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings PublishingProfileAdvancedSetting { get => _galleryApplicationVersionBody.PublishingProfileAdvancedSetting ?? null /* object */; set => _galleryApplicationVersionBody.PublishingProfileAdvancedSetting = value; } + /// Optional. Whether or not this application reports health. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Whether or not this application reports health.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] @@ -214,7 +254,7 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateExpanded : global:: SerializedName = @"enableHealthCheck", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public global::System.Management.Automation.SwitchParameter PublishingProfileEnableHealthCheck { get => GalleryApplicationVersionBody.PublishingProfileEnableHealthCheck ?? default(global::System.Management.Automation.SwitchParameter); set => GalleryApplicationVersionBody.PublishingProfileEnableHealthCheck = value; } + public global::System.Management.Automation.SwitchParameter PublishingProfileEnableHealthCheck { get => _galleryApplicationVersionBody.PublishingProfileEnableHealthCheck ?? default(global::System.Management.Automation.SwitchParameter); set => _galleryApplicationVersionBody.PublishingProfileEnableHealthCheck = value; } /// /// The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property @@ -228,7 +268,7 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateExpanded : global:: Description = @"The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable.", SerializedName = @"endOfLifeDate", PossibleTypes = new [] { typeof(global::System.DateTime) })] - public global::System.DateTime PublishingProfileEndOfLifeDate { get => GalleryApplicationVersionBody.PublishingProfileEndOfLifeDate ?? default(global::System.DateTime); set => GalleryApplicationVersionBody.PublishingProfileEndOfLifeDate = value; } + public global::System.DateTime PublishingProfileEndOfLifeDate { get => _galleryApplicationVersionBody.PublishingProfileEndOfLifeDate ?? default(global::System.DateTime); set => _galleryApplicationVersionBody.PublishingProfileEndOfLifeDate = value; } /// /// If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. @@ -241,7 +281,7 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateExpanded : global:: Description = @"If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.", SerializedName = @"excludeFromLatest", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] - public global::System.Management.Automation.SwitchParameter PublishingProfileExcludeFromLatest { get => GalleryApplicationVersionBody.PublishingProfileExcludeFromLatest ?? default(global::System.Management.Automation.SwitchParameter); set => GalleryApplicationVersionBody.PublishingProfileExcludeFromLatest = value; } + public global::System.Management.Automation.SwitchParameter PublishingProfileExcludeFromLatest { get => _galleryApplicationVersionBody.PublishingProfileExcludeFromLatest ?? default(global::System.Management.Automation.SwitchParameter); set => _galleryApplicationVersionBody.PublishingProfileExcludeFromLatest = value; } /// /// Optional parameter which specifies the mode to be used for replication. This property is not updatable. @@ -256,7 +296,7 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateExpanded : global:: PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode))] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode PublishingProfileReplicationMode { get => GalleryApplicationVersionBody.PublishingProfileReplicationMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); set => GalleryApplicationVersionBody.PublishingProfileReplicationMode = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode PublishingProfileReplicationMode { get => _galleryApplicationVersionBody.PublishingProfileReplicationMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); set => _galleryApplicationVersionBody.PublishingProfileReplicationMode = value; } /// /// Specifies the storage account type to be used to store the image. This property is not updatable. @@ -271,7 +311,22 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateExpanded : global:: PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType))] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType PublishingProfileStorageAccountType { get => GalleryApplicationVersionBody.PublishingProfileStorageAccountType ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); set => GalleryApplicationVersionBody.PublishingProfileStorageAccountType = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType PublishingProfileStorageAccountType { get => _galleryApplicationVersionBody.PublishingProfileStorageAccountType ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); set => _galleryApplicationVersionBody.PublishingProfileStorageAccountType = value; } + + /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The target extended locations where the Image Version is going to be replicated to. This property is updatable.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The target extended locations where the Image Version is going to be replicated to. This property is updatable.", + SerializedName = @"targetExtendedLocations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get => _galleryApplicationVersionBody.PublishingProfileTargetExtendedLocation ?? null /* arrayOf */; set => _galleryApplicationVersionBody.PublishingProfileTargetExtendedLocation = value; } /// /// Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. @@ -285,7 +340,7 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateExpanded : global:: SerializedName = @"remove", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public string Remove { get => GalleryApplicationVersionBody.Remove ?? null; set => GalleryApplicationVersionBody.Remove = value; } + public string Remove { get => _galleryApplicationVersionBody.Remove ?? null; set => _galleryApplicationVersionBody.Remove = value; } /// /// The number of replicas of the Image Version to be created per region. This property would take effect for a region when @@ -299,7 +354,7 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateExpanded : global:: Description = @"The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.", SerializedName = @"replicaCount", PossibleTypes = new [] { typeof(int) })] - public int ReplicaCount { get => GalleryApplicationVersionBody.ReplicaCount ?? default(int); set => GalleryApplicationVersionBody.ReplicaCount = value; } + public int ReplicaCount { get => _galleryApplicationVersionBody.ReplicaCount ?? default(int); set => _galleryApplicationVersionBody.ReplicaCount = value; } /// Backing field for property. private string _resourceGroupName; @@ -345,8 +400,8 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateExpanded : global:: ReadOnly = false, Description = @"Resource tags", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags Tag { get => GalleryApplicationVersionBody.Tag ?? null /* object */; set => GalleryApplicationVersionBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags Tag { get => _galleryApplicationVersionBody.Tag ?? null /* object */; set => _galleryApplicationVersionBody.Tag = value; } /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. @@ -359,8 +414,8 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateExpanded : global:: ReadOnly = false, Description = @"The target regions where the Image Version is going to be replicated to. This property is updatable.", SerializedName = @"targetRegions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion) })] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] TargetRegion { get => GalleryApplicationVersionBody.TargetRegion ?? null /* arrayOf */; set => GalleryApplicationVersionBody.TargetRegion = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion) })] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] TargetRegion { get => _galleryApplicationVersionBody.TargetRegion ?? null /* arrayOf */; set => _galleryApplicationVersionBody.TargetRegion = value; } /// /// Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke @@ -376,15 +431,15 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateExpanded : global:: SerializedName = @"update", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public string Update { get => GalleryApplicationVersionBody.Update ?? null; set => GalleryApplicationVersionBody.Update = value; } + public string Update { get => _galleryApplicationVersionBody.Update ?? null; set => _galleryApplicationVersionBody.Update = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -395,18 +450,23 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateExpanded : global:: /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -432,7 +492,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.UpdateAzGalleryApplica clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.GalleryApplicationVersionBody = this.GalleryApplicationVersionBody; + clone._galleryApplicationVersionBody = this._galleryApplicationVersionBody; clone.SubscriptionId = this.SubscriptionId; clone.ResourceGroupName = this.ResourceGroupName; clone.GalleryName = this.GalleryName; @@ -444,7 +504,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.UpdateAzGalleryApplica /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -577,7 +637,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -592,12 +651,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.GalleryApplicationVersionsUpdate(SubscriptionId, ResourceGroupName, GalleryName, GalleryApplicationName, Name, GalleryApplicationVersionBody, onOk, onDefault, this, Pipeline); + await this.Client.GalleryApplicationVersionsUpdate(SubscriptionId, ResourceGroupName, GalleryName, GalleryApplicationName, Name, _galleryApplicationVersionBody, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,GalleryName=GalleryName,GalleryApplicationName=GalleryApplicationName,Name=Name,body=GalleryApplicationVersionBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,GalleryName=GalleryName,GalleryApplicationName=GalleryApplicationName,Name=Name,body=_galleryApplicationVersionBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -628,8 +687,8 @@ public UpdateAzGalleryApplicationVersion_UpdateExpanded() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -651,14 +710,14 @@ public UpdateAzGalleryApplicationVersion_UpdateExpanded() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, GalleryName=GalleryName, GalleryApplicationName=GalleryApplicationName, Name=Name, body=GalleryApplicationVersionBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, GalleryName=GalleryName, GalleryApplicationName=GalleryApplicationName, Name=Name, body=_galleryApplicationVersionBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, GalleryName=GalleryName, GalleryApplicationName=GalleryApplicationName, Name=Name, body=GalleryApplicationVersionBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, GalleryName=GalleryName, GalleryApplicationName=GalleryApplicationName, Name=Name, body=_galleryApplicationVersionBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -668,12 +727,12 @@ public UpdateAzGalleryApplicationVersion_UpdateExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -685,7 +744,7 @@ public UpdateAzGalleryApplicationVersion_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion WriteObject((await response)); } } diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded.cs b/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded.cs index 4b693a5b7220..15cc68d720df 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzGalleryApplicationVersion_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Description(@"Update a gallery Application Version.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Generated] public partial class UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, @@ -34,6 +34,11 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// + /// Specifies information about the gallery Application Version that you want to update. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate _galleryApplicationVersionBody = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionUpdate(); + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] @@ -47,6 +52,20 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.Compute.Compute Client => Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.ClientAPI; + /// + /// Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, + /// the config file will be named the Gallery Application name appended with "_config". + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with \"_config\".")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with ""_config"".", + SerializedName = @"configFileName", + PossibleTypes = new [] { typeof(string) })] + public string ConfigFileName { get => _galleryApplicationVersionBody.SettingConfigFileName ?? null; set => _galleryApplicationVersionBody.SettingConfigFileName = value; } + /// /// Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. /// @@ -58,7 +77,7 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded Description = @"Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob.", SerializedName = @"defaultConfigurationLink", PossibleTypes = new [] { typeof(string) })] - public string DefaultConfigFileLink { get => GalleryApplicationVersionBody.DefaultConfigFileLink ?? null; set => GalleryApplicationVersionBody.DefaultConfigFileLink = value; } + public string DefaultConfigFileLink { get => _galleryApplicationVersionBody.DefaultConfigFileLink ?? null; set => _galleryApplicationVersionBody.DefaultConfigFileLink = value; } /// /// The credentials, account, tenant, and subscription used for communication with Azure @@ -69,14 +88,6 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdate _galleryApplicationVersionBody= new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationVersionUpdate(); - - /// - /// Specifies information about the gallery Application Version that you want to update. - /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersionUpdate GalleryApplicationVersionBody { get => this._galleryApplicationVersionBody; set => this._galleryApplicationVersionBody = value; } - /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -109,17 +120,17 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded SerializedName = @"install", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public string Install { get => GalleryApplicationVersionBody.Install ?? null; set => GalleryApplicationVersionBody.Install = value; } + public string Install { get => _galleryApplicationVersionBody.Install ?? null; set => _galleryApplicationVersionBody.Install = value; } /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -139,7 +150,21 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded Description = @"Required. The mediaLink of the artifact, must be a readable storage page blob.", SerializedName = @"mediaLink", PossibleTypes = new [] { typeof(string) })] - public string PackageFileLink { get => GalleryApplicationVersionBody.PackageFileLink ?? null; set => GalleryApplicationVersionBody.PackageFileLink = value; } + public string PackageFileLink { get => _galleryApplicationVersionBody.PackageFileLink ?? null; set => _galleryApplicationVersionBody.PackageFileLink = value; } + + /// + /// Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, + /// the package file will be named the same as the Gallery Application name. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, the package file will be named the same as the Gallery Application name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, the package file will be named the same as the Gallery Application name.", + SerializedName = @"packageFileName", + PossibleTypes = new [] { typeof(string) })] + public string PackageFileName { get => _galleryApplicationVersionBody.SettingPackageFileName ?? null; set => _galleryApplicationVersionBody.SettingPackageFileName = value; } /// /// The instance of the that the remote call will use. @@ -162,6 +187,21 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + /// + /// Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only.", + SerializedName = @"advancedSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPublishingProfileAdvancedSettings PublishingProfileAdvancedSetting { get => _galleryApplicationVersionBody.PublishingProfileAdvancedSetting ?? null /* object */; set => _galleryApplicationVersionBody.PublishingProfileAdvancedSetting = value; } + /// Optional. Whether or not this application reports health. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Whether or not this application reports health.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] @@ -172,7 +212,7 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded SerializedName = @"enableHealthCheck", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public global::System.Management.Automation.SwitchParameter PublishingProfileEnableHealthCheck { get => GalleryApplicationVersionBody.PublishingProfileEnableHealthCheck ?? default(global::System.Management.Automation.SwitchParameter); set => GalleryApplicationVersionBody.PublishingProfileEnableHealthCheck = value; } + public global::System.Management.Automation.SwitchParameter PublishingProfileEnableHealthCheck { get => _galleryApplicationVersionBody.PublishingProfileEnableHealthCheck ?? default(global::System.Management.Automation.SwitchParameter); set => _galleryApplicationVersionBody.PublishingProfileEnableHealthCheck = value; } /// /// The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property @@ -186,7 +226,7 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded Description = @"The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable.", SerializedName = @"endOfLifeDate", PossibleTypes = new [] { typeof(global::System.DateTime) })] - public global::System.DateTime PublishingProfileEndOfLifeDate { get => GalleryApplicationVersionBody.PublishingProfileEndOfLifeDate ?? default(global::System.DateTime); set => GalleryApplicationVersionBody.PublishingProfileEndOfLifeDate = value; } + public global::System.DateTime PublishingProfileEndOfLifeDate { get => _galleryApplicationVersionBody.PublishingProfileEndOfLifeDate ?? default(global::System.DateTime); set => _galleryApplicationVersionBody.PublishingProfileEndOfLifeDate = value; } /// /// If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. @@ -199,7 +239,7 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded Description = @"If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.", SerializedName = @"excludeFromLatest", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] - public global::System.Management.Automation.SwitchParameter PublishingProfileExcludeFromLatest { get => GalleryApplicationVersionBody.PublishingProfileExcludeFromLatest ?? default(global::System.Management.Automation.SwitchParameter); set => GalleryApplicationVersionBody.PublishingProfileExcludeFromLatest = value; } + public global::System.Management.Automation.SwitchParameter PublishingProfileExcludeFromLatest { get => _galleryApplicationVersionBody.PublishingProfileExcludeFromLatest ?? default(global::System.Management.Automation.SwitchParameter); set => _galleryApplicationVersionBody.PublishingProfileExcludeFromLatest = value; } /// /// Optional parameter which specifies the mode to be used for replication. This property is not updatable. @@ -214,7 +254,7 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode))] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode PublishingProfileReplicationMode { get => GalleryApplicationVersionBody.PublishingProfileReplicationMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); set => GalleryApplicationVersionBody.PublishingProfileReplicationMode = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode PublishingProfileReplicationMode { get => _galleryApplicationVersionBody.PublishingProfileReplicationMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode)""); set => _galleryApplicationVersionBody.PublishingProfileReplicationMode = value; } /// /// Specifies the storage account type to be used to store the image. This property is not updatable. @@ -229,7 +269,22 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType))] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType PublishingProfileStorageAccountType { get => GalleryApplicationVersionBody.PublishingProfileStorageAccountType ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); set => GalleryApplicationVersionBody.PublishingProfileStorageAccountType = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType PublishingProfileStorageAccountType { get => _galleryApplicationVersionBody.PublishingProfileStorageAccountType ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType)""); set => _galleryApplicationVersionBody.PublishingProfileStorageAccountType = value; } + + /// + /// The target extended locations where the Image Version is going to be replicated to. This property is updatable. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The target extended locations where the Image Version is going to be replicated to. This property is updatable.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The target extended locations where the Image Version is going to be replicated to. This property is updatable.", + SerializedName = @"targetExtendedLocations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryTargetExtendedLocation[] PublishingProfileTargetExtendedLocation { get => _galleryApplicationVersionBody.PublishingProfileTargetExtendedLocation ?? null /* arrayOf */; set => _galleryApplicationVersionBody.PublishingProfileTargetExtendedLocation = value; } /// /// Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. @@ -243,7 +298,7 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded SerializedName = @"remove", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public string Remove { get => GalleryApplicationVersionBody.Remove ?? null; set => GalleryApplicationVersionBody.Remove = value; } + public string Remove { get => _galleryApplicationVersionBody.Remove ?? null; set => _galleryApplicationVersionBody.Remove = value; } /// /// The number of replicas of the Image Version to be created per region. This property would take effect for a region when @@ -257,7 +312,7 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded Description = @"The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.", SerializedName = @"replicaCount", PossibleTypes = new [] { typeof(int) })] - public int ReplicaCount { get => GalleryApplicationVersionBody.ReplicaCount ?? default(int); set => GalleryApplicationVersionBody.ReplicaCount = value; } + public int ReplicaCount { get => _galleryApplicationVersionBody.ReplicaCount ?? default(int); set => _galleryApplicationVersionBody.ReplicaCount = value; } /// Resource tags [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ExportAs(typeof(global::System.Collections.Hashtable))] @@ -268,8 +323,8 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded ReadOnly = false, Description = @"Resource tags", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags Tag { get => GalleryApplicationVersionBody.Tag ?? null /* object */; set => GalleryApplicationVersionBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags Tag { get => _galleryApplicationVersionBody.Tag ?? null /* object */; set => _galleryApplicationVersionBody.Tag = value; } /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. @@ -282,8 +337,8 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded ReadOnly = false, Description = @"The target regions where the Image Version is going to be replicated to. This property is updatable.", SerializedName = @"targetRegions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion) })] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] TargetRegion { get => GalleryApplicationVersionBody.TargetRegion ?? null /* arrayOf */; set => GalleryApplicationVersionBody.TargetRegion = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion) })] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] TargetRegion { get => _galleryApplicationVersionBody.TargetRegion ?? null /* arrayOf */; set => _galleryApplicationVersionBody.TargetRegion = value; } /// /// Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke @@ -299,15 +354,15 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded SerializedName = @"update", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public string Update { get => GalleryApplicationVersionBody.Update ?? null; set => GalleryApplicationVersionBody.Update = value; } + public string Update { get => _galleryApplicationVersionBody.Update ?? null; set => _galleryApplicationVersionBody.Update = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -318,18 +373,23 @@ public partial class UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -357,14 +417,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.UpdateAzGalleryApplica clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.GalleryApplicationVersionBody = this.GalleryApplicationVersionBody; + clone._galleryApplicationVersionBody = this._galleryApplicationVersionBody; return clone; } /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -497,7 +557,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -514,7 +573,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.GalleryApplicationVersionsUpdateViaIdentity(InputObject.Id, GalleryApplicationVersionBody, onOk, onDefault, this, Pipeline); + await this.Client.GalleryApplicationVersionsUpdateViaIdentity(InputObject.Id, _galleryApplicationVersionBody, onOk, onDefault, this, Pipeline); } else { @@ -539,13 +598,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.GalleryApplicationVersionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.GalleryApplicationVersionsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.GalleryName ?? null, InputObject.GalleryApplicationName ?? null, InputObject.GalleryApplicationVersionName ?? null, GalleryApplicationVersionBody, onOk, onDefault, this, Pipeline); + await this.Client.GalleryApplicationVersionsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.GalleryName ?? null, InputObject.GalleryApplicationName ?? null, InputObject.GalleryApplicationVersionName ?? null, _galleryApplicationVersionBody, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=GalleryApplicationVersionBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_galleryApplicationVersionBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -576,8 +635,8 @@ public UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -599,14 +658,14 @@ public UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=GalleryApplicationVersionBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_galleryApplicationVersionBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=GalleryApplicationVersionBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_galleryApplicationVersionBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -616,12 +675,12 @@ public UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -633,7 +692,7 @@ public UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion WriteObject((await response)); } } diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplication_UpdateExpanded.cs b/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplication_UpdateExpanded.cs index 82f5530c6484..0d4896449474 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplication_UpdateExpanded.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplication_UpdateExpanded.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzGalleryApplication_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication))] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Description(@"Update a gallery Application Definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Generated] public partial class UpdateAzGalleryApplication_UpdateExpanded : global::System.Management.Automation.PSCmdlet, @@ -33,6 +33,11 @@ public partial class UpdateAzGalleryApplication_UpdateExpanded : global::System. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// + /// Specifies information about the gallery Application Definition that you want to update. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate _galleryApplicationBody = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationUpdate(); + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] @@ -66,7 +71,7 @@ public partial class UpdateAzGalleryApplication_UpdateExpanded : global::System. Description = @"The description of this gallery Application Definition resource. This property is updatable.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] - public string Description { get => GalleryApplicationBody.Description ?? null; set => GalleryApplicationBody.Description = value; } + public string Description { get => _galleryApplicationBody.Description ?? null; set => _galleryApplicationBody.Description = value; } /// /// The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This @@ -81,7 +86,7 @@ public partial class UpdateAzGalleryApplication_UpdateExpanded : global::System. SerializedName = @"endOfLifeDate", PossibleTypes = new [] { typeof(global::System.DateTime) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public global::System.DateTime EndOfLifeDate { get => GalleryApplicationBody.EndOfLifeDate ?? default(global::System.DateTime); set => GalleryApplicationBody.EndOfLifeDate = value; } + public global::System.DateTime EndOfLifeDate { get => _galleryApplicationBody.EndOfLifeDate ?? default(global::System.DateTime); set => _galleryApplicationBody.EndOfLifeDate = value; } /// The Eula agreement for the gallery Application Definition. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Eula agreement for the gallery Application Definition.")] @@ -93,15 +98,7 @@ public partial class UpdateAzGalleryApplication_UpdateExpanded : global::System. SerializedName = @"eula", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public string Eula { get => GalleryApplicationBody.Eula ?? null; set => GalleryApplicationBody.Eula = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdate _galleryApplicationBody= new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationUpdate(); - - /// - /// Specifies information about the gallery Application Definition that you want to update. - /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdate GalleryApplicationBody { get => this._galleryApplicationBody; set => this._galleryApplicationBody = value; } + public string Eula { get => _galleryApplicationBody.Eula ?? null; set => _galleryApplicationBody.Eula = value; } /// Backing field for property. private string _galleryName; @@ -135,11 +132,11 @@ public partial class UpdateAzGalleryApplication_UpdateExpanded : global::System. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -183,7 +180,7 @@ public partial class UpdateAzGalleryApplication_UpdateExpanded : global::System. SerializedName = @"privacyStatementUri", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public string PrivacyStatementUri { get => GalleryApplicationBody.PrivacyStatementUri ?? null; set => GalleryApplicationBody.PrivacyStatementUri = value; } + public string PrivacyStatementUri { get => _galleryApplicationBody.PrivacyStatementUri ?? null; set => _galleryApplicationBody.PrivacyStatementUri = value; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -211,7 +208,7 @@ public partial class UpdateAzGalleryApplication_UpdateExpanded : global::System. SerializedName = @"releaseNoteUri", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public string ReleaseNoteUri { get => GalleryApplicationBody.ReleaseNoteUri ?? null; set => GalleryApplicationBody.ReleaseNoteUri = value; } + public string ReleaseNoteUri { get => _galleryApplicationBody.ReleaseNoteUri ?? null; set => _galleryApplicationBody.ReleaseNoteUri = value; } /// Backing field for property. private string _resourceGroupName; @@ -262,7 +259,7 @@ public partial class UpdateAzGalleryApplication_UpdateExpanded : global::System. PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes))] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes SupportedOSType { get => GalleryApplicationBody.SupportedOSType ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes)""); set => GalleryApplicationBody.SupportedOSType = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes SupportedOSType { get => _galleryApplicationBody.SupportedOSType ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes)""); set => _galleryApplicationBody.SupportedOSType = value; } /// Resource tags [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ExportAs(typeof(global::System.Collections.Hashtable))] @@ -273,16 +270,16 @@ public partial class UpdateAzGalleryApplication_UpdateExpanded : global::System. ReadOnly = false, Description = @"Resource tags", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags Tag { get => GalleryApplicationBody.Tag ?? null /* object */; set => GalleryApplicationBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags Tag { get => _galleryApplicationBody.Tag ?? null /* object */; set => _galleryApplicationBody.Tag = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -293,18 +290,23 @@ public partial class UpdateAzGalleryApplication_UpdateExpanded : global::System. /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -330,7 +332,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.UpdateAzGalleryApplica clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.GalleryApplicationBody = this.GalleryApplicationBody; + clone._galleryApplicationBody = this._galleryApplicationBody; clone.SubscriptionId = this.SubscriptionId; clone.ResourceGroupName = this.ResourceGroupName; clone.GalleryName = this.GalleryName; @@ -341,7 +343,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.UpdateAzGalleryApplica /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -474,7 +476,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -489,12 +490,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.GalleryApplicationsUpdate(SubscriptionId, ResourceGroupName, GalleryName, Name, GalleryApplicationBody, onOk, onDefault, this, Pipeline); + await this.Client.GalleryApplicationsUpdate(SubscriptionId, ResourceGroupName, GalleryName, Name, _galleryApplicationBody, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,GalleryName=GalleryName,Name=Name,body=GalleryApplicationBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,GalleryName=GalleryName,Name=Name,body=_galleryApplicationBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -525,8 +526,8 @@ public UpdateAzGalleryApplication_UpdateExpanded() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -548,14 +549,14 @@ public UpdateAzGalleryApplication_UpdateExpanded() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, GalleryName=GalleryName, Name=Name, body=GalleryApplicationBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, GalleryName=GalleryName, Name=Name, body=_galleryApplicationBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, GalleryName=GalleryName, Name=Name, body=GalleryApplicationBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, GalleryName=GalleryName, Name=Name, body=_galleryApplicationBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -565,12 +566,12 @@ public UpdateAzGalleryApplication_UpdateExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -582,7 +583,7 @@ public UpdateAzGalleryApplication_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication WriteObject((await response)); } } diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplication_UpdateViaIdentityExpanded.cs b/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplication_UpdateViaIdentityExpanded.cs index 790ad7e566d8..c3b2629a9046 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplication_UpdateViaIdentityExpanded.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplication_UpdateViaIdentityExpanded.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzGalleryApplication_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication))] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Description(@"Update a gallery Application Definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Generated] public partial class UpdateAzGalleryApplication_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, @@ -33,6 +33,11 @@ public partial class UpdateAzGalleryApplication_UpdateViaIdentityExpanded : glob /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// + /// Specifies information about the gallery Application Definition that you want to update. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate _galleryApplicationBody = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationUpdate(); + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] @@ -66,7 +71,7 @@ public partial class UpdateAzGalleryApplication_UpdateViaIdentityExpanded : glob Description = @"The description of this gallery Application Definition resource. This property is updatable.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] - public string Description { get => GalleryApplicationBody.Description ?? null; set => GalleryApplicationBody.Description = value; } + public string Description { get => _galleryApplicationBody.Description ?? null; set => _galleryApplicationBody.Description = value; } /// /// The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This @@ -81,7 +86,7 @@ public partial class UpdateAzGalleryApplication_UpdateViaIdentityExpanded : glob SerializedName = @"endOfLifeDate", PossibleTypes = new [] { typeof(global::System.DateTime) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public global::System.DateTime EndOfLifeDate { get => GalleryApplicationBody.EndOfLifeDate ?? default(global::System.DateTime); set => GalleryApplicationBody.EndOfLifeDate = value; } + public global::System.DateTime EndOfLifeDate { get => _galleryApplicationBody.EndOfLifeDate ?? default(global::System.DateTime); set => _galleryApplicationBody.EndOfLifeDate = value; } /// The Eula agreement for the gallery Application Definition. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Eula agreement for the gallery Application Definition.")] @@ -93,15 +98,7 @@ public partial class UpdateAzGalleryApplication_UpdateViaIdentityExpanded : glob SerializedName = @"eula", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public string Eula { get => GalleryApplicationBody.Eula ?? null; set => GalleryApplicationBody.Eula = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdate _galleryApplicationBody= new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.GalleryApplicationUpdate(); - - /// - /// Specifies information about the gallery Application Definition that you want to update. - /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationUpdate GalleryApplicationBody { get => this._galleryApplicationBody; set => this._galleryApplicationBody = value; } + public string Eula { get => _galleryApplicationBody.Eula ?? null; set => _galleryApplicationBody.Eula = value; } /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] @@ -127,11 +124,11 @@ public partial class UpdateAzGalleryApplication_UpdateViaIdentityExpanded : glob public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -157,7 +154,7 @@ public partial class UpdateAzGalleryApplication_UpdateViaIdentityExpanded : glob SerializedName = @"privacyStatementUri", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public string PrivacyStatementUri { get => GalleryApplicationBody.PrivacyStatementUri ?? null; set => GalleryApplicationBody.PrivacyStatementUri = value; } + public string PrivacyStatementUri { get => _galleryApplicationBody.PrivacyStatementUri ?? null; set => _galleryApplicationBody.PrivacyStatementUri = value; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -185,7 +182,7 @@ public partial class UpdateAzGalleryApplication_UpdateViaIdentityExpanded : glob SerializedName = @"releaseNoteUri", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] - public string ReleaseNoteUri { get => GalleryApplicationBody.ReleaseNoteUri ?? null; set => GalleryApplicationBody.ReleaseNoteUri = value; } + public string ReleaseNoteUri { get => _galleryApplicationBody.ReleaseNoteUri ?? null; set => _galleryApplicationBody.ReleaseNoteUri = value; } /// /// This property allows you to specify the supported type of the OS that application is built for.

Possible values @@ -201,7 +198,7 @@ public partial class UpdateAzGalleryApplication_UpdateViaIdentityExpanded : glob PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.DoNotExport] [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes))] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes SupportedOSType { get => GalleryApplicationBody.SupportedOSType ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes)""); set => GalleryApplicationBody.SupportedOSType = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes SupportedOSType { get => _galleryApplicationBody.SupportedOSType ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes)""); set => _galleryApplicationBody.SupportedOSType = value; } /// Resource tags [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ExportAs(typeof(global::System.Collections.Hashtable))] @@ -212,16 +209,16 @@ public partial class UpdateAzGalleryApplication_UpdateViaIdentityExpanded : glob ReadOnly = false, Description = @"Resource tags", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags Tag { get => GalleryApplicationBody.Tag ?? null /* object */; set => GalleryApplicationBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags Tag { get => _galleryApplicationBody.Tag ?? null /* object */; set => _galleryApplicationBody.Tag = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -232,18 +229,23 @@ public partial class UpdateAzGalleryApplication_UpdateViaIdentityExpanded : glob /// on that response. Implement this method in a partial class to enable this behavior ///
/// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -269,14 +271,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.UpdateAzGalleryApplica clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.GalleryApplicationBody = this.GalleryApplicationBody; + clone._galleryApplicationBody = this._galleryApplicationBody; return clone; } /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -409,7 +411,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -426,7 +427,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.GalleryApplicationsUpdateViaIdentity(InputObject.Id, GalleryApplicationBody, onOk, onDefault, this, Pipeline); + await this.Client.GalleryApplicationsUpdateViaIdentity(InputObject.Id, _galleryApplicationBody, onOk, onDefault, this, Pipeline); } else { @@ -447,13 +448,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.GalleryApplicationName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.GalleryApplicationsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.GalleryName ?? null, InputObject.GalleryApplicationName ?? null, GalleryApplicationBody, onOk, onDefault, this, Pipeline); + await this.Client.GalleryApplicationsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.GalleryName ?? null, InputObject.GalleryApplicationName ?? null, _galleryApplicationBody, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=GalleryApplicationBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_galleryApplicationBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -484,8 +485,8 @@ public UpdateAzGalleryApplication_UpdateViaIdentityExpanded() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). ///
/// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ICloudError + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -507,14 +508,14 @@ public UpdateAzGalleryApplication_UpdateViaIdentityExpanded() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=GalleryApplicationBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_galleryApplicationBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=GalleryApplicationBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_galleryApplicationBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -524,12 +525,12 @@ public UpdateAzGalleryApplication_UpdateViaIdentityExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -541,7 +542,7 @@ public UpdateAzGalleryApplication_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication WriteObject((await response)); } } diff --git a/src/Compute/Compute.Autorest/generated/runtime/AsyncOperationResponse.cs b/src/Compute/Compute.Autorest/generated/runtime/AsyncOperationResponse.cs index ee9c6b0edf47..f7d04851df1f 100644 --- a/src/Compute/Compute.Autorest/generated/runtime/AsyncOperationResponse.cs +++ b/src/Compute/Compute.Autorest/generated/runtime/AsyncOperationResponse.cs @@ -31,10 +31,10 @@ public static AsyncOperationResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static AsyncOperationResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); } @@ -43,19 +43,19 @@ public partial class AsyncOperationResponseTypeConverter : System.Management.Aut { /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the + /// true if the converter can convert the parameter to the /// parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to a type /// parameter. /// /// the instance to check if it can be converted to the - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the parameter ///
/// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the + /// true if the converter can convert the parameter to the /// parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -128,8 +128,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs index fc571d538e2b..bb1132b733d2 100644 --- a/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs +++ b/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -51,7 +51,7 @@ protected override void ProcessRecord() throw new ArgumentException($"Custom folder '{CustomFolder}' does not exist"); } - string version = Convert.ToString(@"0.1.0"); + string version = Convert.ToString(@"0.2.0"); // Validate the module version should be semantic version // Following regex is official from https://semver.org/ Regex rx = new Regex(@"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$", RegexOptions.Compiled); diff --git a/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs b/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs index 2a326a082faa..531e023e5afd 100644 --- a/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs +++ b/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs @@ -52,6 +52,17 @@ public override string ToString() internal class HelpExampleOutput { + private string ExampleTemplate = + "{0}{1}" + Environment.NewLine + + "{2}" + Environment.NewLine + "{3}" + Environment.NewLine + "{4}" + Environment.NewLine + Environment.NewLine + + "{5}" + Environment.NewLine + Environment.NewLine; + + private string ExampleTemplateWithOutput = + "{0}{1}" + Environment.NewLine + + "{2}" + Environment.NewLine + "{3}" + Environment.NewLine + "{4}" + Environment.NewLine + Environment.NewLine + + "{5}" + Environment.NewLine + "{6}" + Environment.NewLine + "{7}" + Environment.NewLine + Environment.NewLine + + "{8}" + Environment.NewLine + Environment.NewLine; + public MarkdownExampleHelpInfo ExampleInfo { get; } public HelpExampleOutput(MarkdownExampleHelpInfo exampleInfo) @@ -59,17 +70,26 @@ public HelpExampleOutput(MarkdownExampleHelpInfo exampleInfo) ExampleInfo = exampleInfo; } - public override string ToString() => $@"{ExampleNameHeader}{ExampleInfo.Name} -{ExampleCodeHeader} -{ExampleInfo.Code} -{ExampleCodeFooter} - -{ExampleInfo.Description.ToDescriptionFormat()} - -"; + public override string ToString() + { + if (string.IsNullOrEmpty(ExampleInfo.Output)) + { + return string.Format(ExampleTemplate, + ExampleNameHeader, ExampleInfo.Name, + ExampleCodeHeader, ExampleInfo.Code, ExampleCodeFooter, + ExampleInfo.Description.ToDescriptionFormat()); + } + else + { + return string.Format(ExampleTemplateWithOutput, + ExampleNameHeader, ExampleInfo.Name, + ExampleCodeHeader, ExampleInfo.Code, ExampleCodeFooter, + ExampleOutputHeader, ExampleInfo.Output, ExampleOutputFooter, + ExampleInfo.Description.ToDescriptionFormat()); ; + } + } } - - + internal class HelpParameterOutput { public MarkdownParameterHelpInfo ParameterInfo { get; } @@ -141,7 +161,7 @@ public ModulePageCmdletOutput(MarkdownHelpInfo helpInfo) } public override string ToString() => $@"### [{HelpInfo.CmdletName}]({HelpInfo.CmdletName}.md) -{HelpInfo.Description.ToDescriptionFormat()} +{HelpInfo.Synopsis.ToDescriptionFormat()} "; } @@ -161,6 +181,8 @@ public static string ToDescriptionFormat(this string text, bool escapeAngleBrack public const string ExampleNameHeader = "### "; public const string ExampleCodeHeader = "```powershell"; public const string ExampleCodeFooter = "```"; + public const string ExampleOutputHeader = "```output"; + public const string ExampleOutputFooter = "```"; public static HelpMetadataOutput ToHelpMetadataOutput(this MarkdownHelpInfo helpInfo) => new HelpMetadataOutput(helpInfo); diff --git a/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs b/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs index 84552eab82d3..a77fc8c70cf9 100644 --- a/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs +++ b/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs @@ -109,18 +109,21 @@ internal class PsHelpExampleInfo { public string Title { get; } public string Code { get; } + public string Output { get; } public string Remarks { get; } public PsHelpExampleInfo(PSObject exampleObject) { Title = exampleObject.GetProperty("title"); Code = exampleObject.GetProperty("code"); + Output = exampleObject.GetProperty("output"); Remarks = exampleObject.GetProperty("remarks").EmptyIfNull().ToDescriptionText(); } public PsHelpExampleInfo(MarkdownExampleHelpInfo markdownExample) { Title = markdownExample.Name; Code = markdownExample.Code; + Output = markdownExample.Output; Remarks = markdownExample.Description; } diff --git a/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs b/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs index d9ffcd65c9b3..6e9eec535d08 100644 --- a/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs +++ b/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs @@ -39,7 +39,7 @@ internal class MarkdownHelpInfo public MarkdownHelpInfo(VariantGroup variantGroup, string examplesFolder, string externalHelpFilename = "") { ExternalHelpFilename = externalHelpFilename; - ModuleName = variantGroup.ModuleName; + ModuleName = variantGroup.RootModuleName != "" ? variantGroup.RootModuleName : variantGroup.ModuleName; var helpInfo = variantGroup.HelpInfo; var commentInfo = variantGroup.CommentInfo; Schema = Version.Parse("2.0.0"); @@ -91,12 +91,17 @@ private MarkdownExampleHelpInfo[] GetExamplesFromMarkdown(string examplesFolder) var code = codeStartIndex.HasValue && codeEndIndex.HasValue ? String.Join(Environment.NewLine, eg.Skip(codeStartIndex.Value + 1).Take(codeEndIndex.Value - (codeStartIndex.Value + 1))) : String.Empty; - var descriptionStartIndex = (codeEndIndex ?? 0) + 1; + var outputStartIndex = eg.Select((l, i) => l.StartsWith(ExampleOutputHeader) ? (int?)i : null).FirstOrDefault(i => i.HasValue); + var outputEndIndex = eg.Select((l, i) => l.StartsWith(ExampleOutputFooter) ? (int?)i : null).FirstOrDefault(i => i.HasValue && i > outputStartIndex); + var output = outputStartIndex.HasValue && outputEndIndex.HasValue + ? String.Join(Environment.NewLine, eg.Skip(outputStartIndex.Value + 1).Take(outputEndIndex.Value - (outputStartIndex.Value + 1))) + : String.Empty; + var descriptionStartIndex = (outputEndIndex ?? (codeEndIndex ?? 0)) + 1; descriptionStartIndex = String.IsNullOrWhiteSpace(eg[descriptionStartIndex]) ? descriptionStartIndex + 1 : descriptionStartIndex; var descriptionEndIndex = eg.Length - 1; descriptionEndIndex = String.IsNullOrWhiteSpace(eg[descriptionEndIndex]) ? descriptionEndIndex - 1 : descriptionEndIndex; var description = String.Join(Environment.NewLine, eg.Skip(descriptionStartIndex).Take((descriptionEndIndex + 1) - descriptionStartIndex)); - return new MarkdownExampleHelpInfo(name, code, description); + return new MarkdownExampleHelpInfo(name, code, output, description); }).ToArray(); } } @@ -154,12 +159,14 @@ internal class MarkdownExampleHelpInfo { public string Name { get; } public string Code { get; } + public string Output { get; } public string Description { get; } - public MarkdownExampleHelpInfo(string name, string code, string description) + public MarkdownExampleHelpInfo(string name, string code, string output, string description) { Name = name; Code = code; + Output = output; Description = description; } } @@ -213,12 +220,12 @@ public MarkdownParameterHelpInfo(PsParameterHelpInfo[] parameterHelpInfos, Param internal static class MarkdownTypesExtensions { - public static MarkdownExampleHelpInfo ToExampleHelpInfo(this PsHelpExampleInfo exampleInfo) => new MarkdownExampleHelpInfo(exampleInfo.Title, exampleInfo.Code, exampleInfo.Remarks); + public static MarkdownExampleHelpInfo ToExampleHelpInfo(this PsHelpExampleInfo exampleInfo) => new MarkdownExampleHelpInfo(exampleInfo.Title, exampleInfo.Code, exampleInfo.Output, exampleInfo.Remarks); public static MarkdownExampleHelpInfo[] DefaultExampleHelpInfos = { - new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"PS C:\> {{{{ Add code here }}}}{Environment.NewLine}{Environment.NewLine}{{{{ Add output here }}}}", @"{{ Add description here }}"), - new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"PS C:\> {{{{ Add code here }}}}{Environment.NewLine}{Environment.NewLine}{{{{ Add output here }}}}", @"{{ Add description here }}") + new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), }; public static MarkdownParameterHelpInfo[] SupportsShouldProcessParameters = diff --git a/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 58a8305b988f..32e7a842fe9a 100644 --- a/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -168,19 +168,56 @@ public ParameterNameOutput(string parameterName, bool isLast) public override string ToString() => $"{Indent}${{{ParameterName}}}{(IsLast ? String.Empty : $",{Environment.NewLine}")}{Environment.NewLine}"; } - internal class BeginOutput + internal class BaseOutput { public VariantGroup VariantGroup { get; } - public BeginOutput(VariantGroup variantGroup) + protected static readonly bool IsAzure = Convert.ToBoolean(@"true"); + public BaseOutput(VariantGroup variantGroup) { VariantGroup = variantGroup; } + public string ClearTelemetryContext() + { + return (!VariantGroup.IsInternal && IsAzure) ? $@"{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()" : ""; + } + } + + internal class BeginOutput : BaseOutput + { + public BeginOutput(VariantGroup variantGroup) : base(variantGroup) + { + } public string GetProcessCustomAttributesAtRuntime() { return VariantGroup.IsInternal ? "" : $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet]{Environment.NewLine}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; } + private string GetTelemetry() + { + if (!VariantGroup.IsInternal && IsAzure) + { + return $@" +{Indent}{Indent}if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {{ +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() +{Indent}{Indent}}} +{Indent}{Indent}$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId +{Indent}{Indent}if ($preTelemetryId -eq '') {{ +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}}} else {{ +{Indent}{Indent}{Indent}$internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets +{Indent}{Indent}{Indent}if ($internalCalledCmdlets -eq '') {{ +{Indent}{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name +{Indent}{Indent}{Indent}}} else {{ +{Indent}{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name +{Indent}{Indent}{Indent}}} +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' +{Indent}{Indent}}} +"; + } + return ""; + } public override string ToString() => $@"begin {{ {Indent}try {{ {Indent}{Indent}$outBuffer = $null @@ -188,6 +225,7 @@ public override string ToString() => $@"begin {{ {Indent}{Indent}{Indent}$PSBoundParameters['OutBuffer'] = 1 {Indent}{Indent}}} {Indent}{Indent}$parameterSet = $PSCmdlet.ParameterSetName +{GetTelemetry()} {GetParameterSetToCmdletMapping()}{GetDefaultValuesStatements()} {GetProcessCustomAttributesAtRuntime()} {Indent}{Indent}$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -195,6 +233,7 @@ public override string ToString() => $@"begin {{ {Indent}{Indent}$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) {Indent}{Indent}$steppablePipeline.Begin($PSCmdlet) {Indent}}} catch {{ +{ClearTelemetryContext()} {Indent}{Indent}throw {Indent}}} }} @@ -231,28 +270,69 @@ private string GetDefaultValuesStatements() } } - internal class ProcessOutput + internal class ProcessOutput : BaseOutput { + public ProcessOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + private string GetFinally() + { + if (IsAzure && !VariantGroup.IsInternal) + { + return $@" +{Indent}finally {{ +{Indent}{Indent}$backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId +{Indent}{Indent}$backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() +{Indent}}} +"; + } + return ""; + } public override string ToString() => $@"process {{ {Indent}try {{ {Indent}{Indent}$steppablePipeline.Process($_) {Indent}}} catch {{ +{ClearTelemetryContext()} {Indent}{Indent}throw {Indent}}} +{GetFinally()} }} - "; } - internal class EndOutput + internal class EndOutput : BaseOutput { + public EndOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + private string GetTelemetry() + { + if (!VariantGroup.IsInternal && IsAzure) + { + return $@" +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets +{Indent}{Indent}if ($preTelemetryId -eq '') {{ +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() +{Indent}{Indent}}} +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId +"; + } + return ""; + } public override string ToString() => $@"end {{ {Indent}try {{ {Indent}{Indent}$steppablePipeline.End() +{GetTelemetry()} {Indent}}} catch {{ +{ClearTelemetryContext()} {Indent}{Indent}throw {Indent}}} -}} +}} "; } @@ -493,9 +573,9 @@ public static string ToSyntaxTypeName(this Type type) public static BeginOutput ToBeginOutput(this VariantGroup variantGroup) => new BeginOutput(variantGroup); - public static ProcessOutput ToProcessOutput(this VariantGroup variantGroup) => new ProcessOutput(); + public static ProcessOutput ToProcessOutput(this VariantGroup variantGroup) => new ProcessOutput(variantGroup); - public static EndOutput ToEndOutput(this VariantGroup variantGroup) => new EndOutput(); + public static EndOutput ToEndOutput(this VariantGroup variantGroup) => new EndOutput(variantGroup); public static HelpCommentOutput ToHelpCommentOutput(this VariantGroup variantGroup) => new HelpCommentOutput(variantGroup); @@ -524,7 +604,7 @@ string RenderProperty(ComplexInterfaceInfo info, string indent, bool dash, bool return ni.IsComplexInterface ? ni.ToNoteOutput(nestedIndent, includeDashes, includeBackticks, false) : RenderProperty(ni, nestedIndent, includeDashes, includeBackticks); - }).Prepend(RenderProperty(complexInterfaceInfo, currentIndent, !isFirst && includeDashes, !isFirst && includeBackticks)); + }).Prepend(RenderProperty(complexInterfaceInfo, currentIndent, !isFirst && includeDashes, includeBackticks)); return String.Join(Environment.NewLine, nested); } } diff --git a/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs index f4bbea328599..152d45fcb24d 100644 --- a/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs +++ b/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -30,6 +30,8 @@ public ProfileGroup(Variant[] variants, string profileName = NoProfiles) internal class VariantGroup { public string ModuleName { get; } + + public string RootModuleName {get => @"";} public string CmdletName { get; } public string CmdletVerb { get; } public string CmdletNoun { get; } @@ -385,7 +387,9 @@ public CommentInfo(VariantGroup variantGroup) helpInfo.OutputTypes.Where(it => it.Name.NullIfWhiteSpace() != null).Select(ot => ot.Name).ToArray()) .Where(o => o != "None").Distinct().OrderBy(o => o).ToArray(); - OnlineVersion = helpInfo.OnlineVersion?.Uri.NullIfEmpty() ?? $@"{HelpLinkPrefix}{variantGroup.ModuleName.ToLowerInvariant()}/{variantGroup.CmdletName.ToLowerInvariant()}"; + // Use root module name in the help link + var moduleName = variantGroup.RootModuleName == "" ? variantGroup.ModuleName.ToLowerInvariant() : variantGroup.RootModuleName.ToLowerInvariant(); + OnlineVersion = helpInfo.OnlineVersion?.Uri.NullIfEmpty() ?? $@"{HelpLinkPrefix}{moduleName}/{variantGroup.CmdletName.ToLowerInvariant()}"; RelatedLinks = helpInfo.RelatedLinks.Select(rl => rl.Text).ToArray(); } } diff --git a/src/Compute/Compute.Autorest/generated/runtime/BuildTime/PsHelpers.cs b/src/Compute/Compute.Autorest/generated/runtime/BuildTime/PsHelpers.cs index 0331cb47dd0c..ebf72542cd23 100644 --- a/src/Compute/Compute.Autorest/generated/runtime/BuildTime/PsHelpers.cs +++ b/src/Compute/Compute.Autorest/generated/runtime/BuildTime/PsHelpers.cs @@ -39,9 +39,10 @@ public static IEnumerable GetModuleCmdlets(params string[] modulePa public static IEnumerable GetScriptCmdlets(PSCmdlet cmdlet, string scriptFolder) { // https://stackoverflow.com/a/40969712/294804 + var wrappedFolder = scriptFolder.Contains("'") ? $@"""{scriptFolder}""" : $@"'{scriptFolder}'"; var getCmdletsCommand = $@" $currentFunctions = Get-ChildItem function: -Get-ChildItem -Path '{scriptFolder}' -Recurse -Include '*.ps1' -File | ForEach-Object {{ . $_.FullName }} +Get-ChildItem -Path {wrappedFolder} -Recurse -Include '*.ps1' -File | ForEach-Object {{ . $_.FullName }} Get-ChildItem function: | Where-Object {{ ($currentFunctions -notcontains $_) -and $_.CmdletBinding }} "; return cmdlet?.RunScript(getCmdletsCommand) ?? RunScript(getCmdletsCommand); diff --git a/src/Compute/Compute.Autorest/generated/runtime/Customizations/IJsonSerializable.cs b/src/Compute/Compute.Autorest/generated/runtime/Customizations/IJsonSerializable.cs index 63444c275fc0..5226aa9d299e 100644 --- a/src/Compute/Compute.Autorest/generated/runtime/Customizations/IJsonSerializable.cs +++ b/src/Compute/Compute.Autorest/generated/runtime/Customizations/IJsonSerializable.cs @@ -75,12 +75,18 @@ private static JsonNode ToJsonValue(ValueType vValue) return new JsonBoolean(bValue); } - // dates + // dates if (vValue is DateTime dtValue) { return new JsonDate(dtValue); } + // DictionaryEntity struct type + if (vValue is System.Collections.DictionaryEntry deValue) + { + return new JsonObject { { deValue.Key.ToString(), ToJsonValue(deValue.Value) } }; + } + // sorry, no idea. return null; } @@ -113,7 +119,7 @@ private static JsonNode TryToJsonValue(dynamic oValue) // if we got something out, let's use it. if (null != jsonValue) { - // JsonNumber is really a literal json value. Just don't try to cast that back to an actual number, ok? + // JsonNumber is really a literal json value. Just don't try to cast that back to an actual number, ok? return new JsonNumber(jsonValue.ToString()); } @@ -123,11 +129,11 @@ private static JsonNode TryToJsonValue(dynamic oValue) /// /// Serialize an object by using a variety of methods. /// - /// the object to be serialized. + /// the object to be serialized. /// the serialized JsonNode (if successful), otherwise, null internal static JsonNode ToJsonValue(object value) { - // things that implement our interface are preferred. + // things that implement our interface are preferred. if (value is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable jsonSerializable) { return jsonSerializable.ToJson(); @@ -139,7 +145,7 @@ internal static JsonNode ToJsonValue(object value) return new JsonString(value.ToString()); } - // value types are fairly straightforward (fallback to ToJson()/ToJsonString() or literal JsonString ) + // value types are fairly straightforward (fallback to ToJson()/ToJsonString() or literal JsonString ) if (value is System.ValueType vValue) { return ToJsonValue(vValue) ?? TryToJsonValue(vValue) ?? new JsonString(vValue.ToString()); @@ -159,7 +165,7 @@ internal static JsonNode ToJsonValue(object value) return Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.JsonSerializable.ToJson(dict, null); } - // enumerable collections are handled like arrays (again, fallback to ToJson()/ToJsonString() or literal JsonString) + // enumerable collections are handled like arrays (again, fallback to ToJson()/ToJsonString() or literal JsonString) if (value is System.Collections.IEnumerable enumerableValue) { // some kind of enumerable value @@ -185,7 +191,7 @@ internal static JsonObject ToJson(System.Collections.Generic.IDictionary /// PowerShell-specific data on top of the llc# EventData ///
@@ -16,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime /// Obviously, this code would need to be duplcated on both modules. /// This is preferable to sharing a common library, as versioning makes that problematic. /// + [System.ComponentModel.TypeConverter(typeof(EventDataConverter))] public partial class EventData : EventArgs { } diff --git a/src/Compute/Compute.Autorest/generated/runtime/ISendAsync.cs b/src/Compute/Compute.Autorest/generated/runtime/ISendAsync.cs index 8dd92193667f..b76ba95ed7e4 100644 --- a/src/Compute/Compute.Autorest/generated/runtime/ISendAsync.cs +++ b/src/Compute/Compute.Autorest/generated/runtime/ISendAsync.cs @@ -238,6 +238,8 @@ internal static Task CloneWithContentAndDispose(this HttpReq /// Clones an HttpRequestMessage (without the content) ///
/// Original HttpRequestMessage (Will be diposed before returning) + /// + /// /// A clone of the HttpRequestMessage internal static HttpRequestMessage Clone(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) { @@ -252,9 +254,9 @@ internal static HttpRequestMessage Clone(this HttpRequestMessage original, Syste { clone.Properties.Add(prop); } - + foreach (KeyValuePair> header in original.Headers) - { + { /* **temporarily skip cloning telemetry related headers** clone.Headers.TryAddWithoutValidation(header.Key, header.Value); @@ -264,7 +266,7 @@ internal static HttpRequestMessage Clone(this HttpRequestMessage original, Syste clone.Headers.TryAddWithoutValidation(header.Key, header.Value); } } - + return clone; } @@ -272,6 +274,8 @@ internal static HttpRequestMessage Clone(this HttpRequestMessage original, Syste /// Clones an HttpRequestMessage (including the content stream and content headers) ///
/// Original HttpRequestMessage (Will be diposed before returning) + /// + /// /// A clone of the HttpRequestMessage internal static async Task CloneWithContent(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) { diff --git a/src/Compute/Compute.Autorest/generated/runtime/MessageAttribute.cs b/src/Compute/Compute.Autorest/generated/runtime/MessageAttribute.cs index 028f90cabf50..016eb5c161c7 100644 --- a/src/Compute/Compute.Autorest/generated/runtime/MessageAttribute.cs +++ b/src/Compute/Compute.Autorest/generated/runtime/MessageAttribute.cs @@ -276,7 +276,7 @@ protected override string GetAttributeSpecificMessage() /// then the attribbute is applicable /// If the invocationInfo is null we return true ///
- /// + /// /// bool public override bool IsApplicableToInvocation(InvocationInfo invocationInfo) { diff --git a/src/Compute/Compute.Autorest/generated/runtime/PipelineMocking.cs b/src/Compute/Compute.Autorest/generated/runtime/PipelineMocking.cs index 49186a174771..515cb08aa248 100644 --- a/src/Compute/Compute.Autorest/generated/runtime/PipelineMocking.cs +++ b/src/Compute/Compute.Autorest/generated/runtime/PipelineMocking.cs @@ -259,4 +259,4 @@ public async Task SendAsync(HttpRequestMessage request, IEv } } } -} \ No newline at end of file +} diff --git a/src/Compute/Compute.Autorest/generated/runtime/TypeConverterExtensions.cs b/src/Compute/Compute.Autorest/generated/runtime/TypeConverterExtensions.cs index 37d7cba06282..e8a1c5f8bcbc 100644 --- a/src/Compute/Compute.Autorest/generated/runtime/TypeConverterExtensions.cs +++ b/src/Compute/Compute.Autorest/generated/runtime/TypeConverterExtensions.cs @@ -32,10 +32,10 @@ internal static T[] SelectToArray(object source, System.Func System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); } #else - catch + catch { // silent conversion fail - } + } #endif return new T[0]; // empty result if couldn't convert. } @@ -53,10 +53,10 @@ internal static T[] SelectToArray(object source, System.Func System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); } #else - catch + catch { // silent conversion fail - } + } #endif } return result.ToArray(); @@ -141,9 +141,9 @@ internal static T GetValueForProperty(this System.Collections.Generic.I System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); } #else - catch + catch { - } + } #endif return defaultValue; } @@ -160,9 +160,9 @@ internal static T GetValueForProperty(this System.Collections.IDictionary dic System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); } #else - catch + catch { - } + } #endif return defaultValue; } @@ -180,11 +180,32 @@ internal static T GetValueForProperty(this System.Management.Automation.PSObj System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); } #else - catch + catch { - } + } #endif return defaultValue; } + + internal static bool Contains(this System.Management.Automation.PSObject psObject, string propertyName) + { + bool result = false; + try + { + var property = System.Linq.Enumerable.FirstOrDefault(psObject.Properties, each => System.String.Equals(each.Name.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + result = property == null ? false : true; + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return result; + } } } diff --git a/src/Compute/Compute.Autorest/generated/runtime/UndeclaredResponseException.cs b/src/Compute/Compute.Autorest/generated/runtime/UndeclaredResponseException.cs index 9a1de7ffd253..fc7cdd0a1757 100644 --- a/src/Compute/Compute.Autorest/generated/runtime/UndeclaredResponseException.cs +++ b/src/Compute/Compute.Autorest/generated/runtime/UndeclaredResponseException.cs @@ -63,7 +63,10 @@ public RestException(System.Net.Http.HttpResponseMessage response) catch { // couldn't get the code/message from the body response. - // we'll create one below. + // In this case, we will assume the response is the expected error message + if(!string.IsNullOrEmpty(ResponseBody)) { + message = ResponseBody; + } } #endif if (string.IsNullOrEmpty(message)) diff --git a/src/Compute/Compute.Autorest/internal/New-AzGalleryApplication.ps1 b/src/Compute/Compute.Autorest/internal/New-AzGalleryApplication.ps1 index 81f2bdd444fa..88304770b409 100644 --- a/src/Compute/Compute.Autorest/internal/New-AzGalleryApplication.ps1 +++ b/src/Compute/Compute.Autorest/internal/New-AzGalleryApplication.ps1 @@ -20,16 +20,15 @@ Create or update a gallery Application Definition. .Description Create or update a gallery Application Definition. .Example -PS C:\> New-AzGalleryApplication -ResourceGroupName $rgName -Location EastUS -GalleryName $galleryName -Name $name -SupportedOSType Windows - +New-AzGalleryApplication -ResourceGroupName $rgName -Location EastUS -GalleryName $galleryName -Name $name -SupportedOSType Windows .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication .Link https://docs.microsoft.com/powershell/module/az.compute/new-azgalleryapplication #> function New-AzGalleryApplication { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -162,6 +161,7 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ CreateExpanded = 'Az.Compute.private\New-AzGalleryApplication_CreateExpanded'; } @@ -174,6 +174,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -182,15 +183,18 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } diff --git a/src/Compute/Compute.Autorest/internal/New-AzGalleryApplicationVersion.ps1 b/src/Compute/Compute.Autorest/internal/New-AzGalleryApplicationVersion.ps1 index e8ab7b1a429e..cabc0397fae6 100644 --- a/src/Compute/Compute.Autorest/internal/New-AzGalleryApplicationVersion.ps1 +++ b/src/Compute/Compute.Autorest/internal/New-AzGalleryApplicationVersion.ps1 @@ -20,22 +20,34 @@ Create or update a gallery Application Version. .Description Create or update a gallery Application Version. .Example -PS C:\> $ctx = New-AzStorageContext -StorageAccountName $storAccName -PS C:\> $SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r -PS C:\> $storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName -PS C:\> $blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context -PS C:\> $SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context -PS C:\> $SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken -PS C:\> New-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -Install "powershell -command 'Expand-Archive -Path package.zip -DestinationPath C:\\package\'" -Remove "del C:\\package" - +$ctx = New-AzStorageContext -StorageAccountName $storAccName +$SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r +$storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName +$blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context +$SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context +$SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken +New-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -Install "powershell -command 'Expand-Archive -Path package.zip -DestinationPath C:\\package\'" -Remove "del C:\\package" .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +PUBLISHINGPROFILETARGETEXTENDEDLOCATION : The target extended locations where the Image Version is going to be replicated to. This property is updatable. + [EncryptionDataDiskImage ]: A list of encryption specifications for data disk images. + Lun : This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. + [DiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. + [ExtendedLocationName ]: + [ExtendedLocationReplicaCount ]: The number of replicas of the Image Version to be created per extended location. This property is updatable. + [ExtendedLocationType ]: It is type of the extended location. + [Name ]: The name of the region. + [OSDiskImageDiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. + [SecurityProfileConfidentialVMEncryptionType ]: confidential VM encryption types + [SecurityProfileSecureVMDiskEncryptionSetId ]: secure VM disk encryption set id + [StorageAccountType ]: Specifies the storage account type to be used to store the image. This property is not updatable. + TARGETREGION : The target regions where the Image Version is going to be replicated to. This property is updatable. Name : The name of the region. [EncryptionDataDiskImage ]: A list of encryption specifications for data disk images. @@ -43,12 +55,14 @@ TARGETREGION : The target regions where the Image Version is go [DiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. [OSDiskImageDiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. [RegionalReplicaCount ]: The number of replicas of the Image Version to be created per region. This property is updatable. + [SecurityProfileConfidentialVMEncryptionType ]: confidential VM encryption types + [SecurityProfileSecureVMDiskEncryptionSetId ]: secure VM disk encryption set id [StorageAccountType ]: Specifies the storage account type to be used to store the image. This property is not updatable. .Link https://docs.microsoft.com/powershell/module/az.compute/new-azgalleryapplicationversion #> function New-AzGalleryApplicationVersion { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -93,6 +107,15 @@ param( # Resource location ${Location}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.String] + # Optional. + # The name to assign the downloaded config file on the VM. + # This is limited to 4096 characters. + # If not specified, the config file will be named the Gallery Application name appended with "_config". + ${ConfigFileName}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] [System.String] @@ -115,6 +138,15 @@ param( # The mediaLink of the artifact, must be a readable storage page blob. ${PackageFileLink}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.String] + # Optional. + # The name to assign the downloaded package file on the VM. + # This is limited to 4096 characters. + # If not specified, the package file will be named the same as the Gallery Application name. + ${PackageFileName}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] [System.DateTime] @@ -155,7 +187,7 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]] # The target regions where the Image Version is going to be replicated to. # This property is updatable. # To construct, see NOTES section for TARGETREGION properties and create a hash table. @@ -237,6 +269,7 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ CreateExpanded = 'Az.Compute.private\New-AzGalleryApplicationVersion_CreateExpanded'; } @@ -249,6 +282,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -257,15 +291,18 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } diff --git a/src/Compute/Compute.Autorest/internal/ProxyCmdletDefinitions.ps1 b/src/Compute/Compute.Autorest/internal/ProxyCmdletDefinitions.ps1 index 3111399d0b42..73b90887f112 100644 --- a/src/Compute/Compute.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/src/Compute/Compute.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -20,22 +20,34 @@ Create or update a gallery Application Version. .Description Create or update a gallery Application Version. .Example -PS C:\> $ctx = New-AzStorageContext -StorageAccountName $storAccName -PS C:\> $SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r -PS C:\> $storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName -PS C:\> $blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context -PS C:\> $SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context -PS C:\> $SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken -PS C:\> New-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -Install "powershell -command 'Expand-Archive -Path package.zip -DestinationPath C:\\package\'" -Remove "del C:\\package" - +$ctx = New-AzStorageContext -StorageAccountName $storAccName +$SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r +$storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName +$blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context +$SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context +$SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken +New-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -Install "powershell -command 'Expand-Archive -Path package.zip -DestinationPath C:\\package\'" -Remove "del C:\\package" .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +PUBLISHINGPROFILETARGETEXTENDEDLOCATION : The target extended locations where the Image Version is going to be replicated to. This property is updatable. + [EncryptionDataDiskImage ]: A list of encryption specifications for data disk images. + Lun : This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. + [DiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. + [ExtendedLocationName ]: + [ExtendedLocationReplicaCount ]: The number of replicas of the Image Version to be created per extended location. This property is updatable. + [ExtendedLocationType ]: It is type of the extended location. + [Name ]: The name of the region. + [OSDiskImageDiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. + [SecurityProfileConfidentialVMEncryptionType ]: confidential VM encryption types + [SecurityProfileSecureVMDiskEncryptionSetId ]: secure VM disk encryption set id + [StorageAccountType ]: Specifies the storage account type to be used to store the image. This property is not updatable. + TARGETREGION : The target regions where the Image Version is going to be replicated to. This property is updatable. Name : The name of the region. [EncryptionDataDiskImage ]: A list of encryption specifications for data disk images. @@ -43,12 +55,14 @@ TARGETREGION : The target regions where the Image Version is go [DiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. [OSDiskImageDiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. [RegionalReplicaCount ]: The number of replicas of the Image Version to be created per region. This property is updatable. + [SecurityProfileConfidentialVMEncryptionType ]: confidential VM encryption types + [SecurityProfileSecureVMDiskEncryptionSetId ]: secure VM disk encryption set id [StorageAccountType ]: Specifies the storage account type to be used to store the image. This property is not updatable. .Link https://docs.microsoft.com/powershell/module/az.compute/new-azgalleryapplicationversion #> function New-AzGalleryApplicationVersion { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -93,6 +107,15 @@ param( # Resource location ${Location}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.String] + # Optional. + # The name to assign the downloaded config file on the VM. + # This is limited to 4096 characters. + # If not specified, the config file will be named the Gallery Application name appended with "_config". + ${ConfigFileName}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] [System.String] @@ -115,6 +138,15 @@ param( # The mediaLink of the artifact, must be a readable storage page blob. ${PackageFileLink}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.String] + # Optional. + # The name to assign the downloaded package file on the VM. + # This is limited to 4096 characters. + # If not specified, the package file will be named the same as the Gallery Application name. + ${PackageFileName}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] [System.DateTime] @@ -155,7 +187,7 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]] # The target regions where the Image Version is going to be replicated to. # This property is updatable. # To construct, see NOTES section for TARGETREGION properties and create a hash table. @@ -237,6 +269,7 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ CreateExpanded = 'Az.Compute.private\New-AzGalleryApplicationVersion_CreateExpanded'; } @@ -249,6 +282,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -257,17 +291,20 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } <# @@ -276,16 +313,15 @@ Create or update a gallery Application Definition. .Description Create or update a gallery Application Definition. .Example -PS C:\> New-AzGalleryApplication -ResourceGroupName $rgName -Location EastUS -GalleryName $galleryName -Name $name -SupportedOSType Windows - +New-AzGalleryApplication -ResourceGroupName $rgName -Location EastUS -GalleryName $galleryName -Name $name -SupportedOSType Windows .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication .Link https://docs.microsoft.com/powershell/module/az.compute/new-azgalleryapplication #> function New-AzGalleryApplication { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -418,6 +454,7 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ CreateExpanded = 'Az.Compute.private\New-AzGalleryApplication_CreateExpanded'; } @@ -430,6 +467,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -438,17 +476,20 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } <# @@ -457,18 +498,18 @@ Update a gallery Application Version. .Description Update a gallery Application Version. .Example -PS C:\> $ctx = New-AzStorageContext -StorageAccountName $storAccName -PS C:\> $SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r -PS C:\> $storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName -PS C:\> $blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context -PS C:\> $SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context -PS C:\> $SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken -PS C:\> Update-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -ReplicaCount 3 +$ctx = New-AzStorageContext -StorageAccountName $storAccName +$SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r +$storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName +$blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context +$SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context +$SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken +Update-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -ReplicaCount 3 .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion .Notes COMPLEX PARAMETER PROPERTIES @@ -490,6 +531,19 @@ INPUTOBJECT : Identity Parameter [VMName ]: The name of the virtual machine where the run command should be created or updated. [VMScaleSetName ]: The name of the VM scale set. +PUBLISHINGPROFILETARGETEXTENDEDLOCATION : The target extended locations where the Image Version is going to be replicated to. This property is updatable. + [EncryptionDataDiskImage ]: A list of encryption specifications for data disk images. + Lun : This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. + [DiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. + [ExtendedLocationName ]: + [ExtendedLocationReplicaCount ]: The number of replicas of the Image Version to be created per extended location. This property is updatable. + [ExtendedLocationType ]: It is type of the extended location. + [Name ]: The name of the region. + [OSDiskImageDiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. + [SecurityProfileConfidentialVMEncryptionType ]: confidential VM encryption types + [SecurityProfileSecureVMDiskEncryptionSetId ]: secure VM disk encryption set id + [StorageAccountType ]: Specifies the storage account type to be used to store the image. This property is not updatable. + TARGETREGION : The target regions where the Image Version is going to be replicated to. This property is updatable. Name : The name of the region. [EncryptionDataDiskImage ]: A list of encryption specifications for data disk images. @@ -497,12 +551,14 @@ TARGETREGION : The target regions where the Image Version is go [DiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. [OSDiskImageDiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. [RegionalReplicaCount ]: The number of replicas of the Image Version to be created per region. This property is updatable. + [SecurityProfileConfidentialVMEncryptionType ]: confidential VM encryption types + [SecurityProfileSecureVMDiskEncryptionSetId ]: secure VM disk encryption set id [StorageAccountType ]: Specifies the storage account type to be used to store the image. This property is not updatable. .Link https://docs.microsoft.com/powershell/module/az.compute/update-azgalleryapplicationversion #> function Update-AzGalleryApplicationVersion { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -548,6 +604,15 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.String] + # Optional. + # The name to assign the downloaded config file on the VM. + # This is limited to 4096 characters. + # If not specified, the config file will be named the Gallery Application name appended with "_config". + ${ConfigFileName}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] [System.String] @@ -562,6 +627,15 @@ param( # The mediaLink of the artifact, must be a readable storage page blob. ${PackageFileLink}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.String] + # Optional. + # The name to assign the downloaded package file on the VM. + # This is limited to 4096 characters. + # If not specified, the package file will be named the same as the Gallery Application name. + ${PackageFileName}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] [System.DateTime] @@ -586,7 +660,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, @@ -594,7 +668,7 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]] # The target regions where the Image Version is going to be replicated to. # This property is updatable. # To construct, see NOTES section for TARGETREGION properties and create a hash table. @@ -667,6 +741,7 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ UpdateExpanded = 'Az.Compute.private\Update-AzGalleryApplicationVersion_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.Compute.private\Update-AzGalleryApplicationVersion_UpdateViaIdentityExpanded'; @@ -680,6 +755,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -688,15 +764,18 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } diff --git a/src/Compute/Compute.Autorest/internal/README.md b/src/Compute/Compute.Autorest/internal/README.md index 1c067d451a74..941a199792a0 100644 --- a/src/Compute/Compute.Autorest/internal/README.md +++ b/src/Compute/Compute.Autorest/internal/README.md @@ -1,5 +1,5 @@ # Internal -This directory contains a module to handle *internal only* cmdlets. Cmdlets that you **hide** in configuration are created here. For more information on hiding, see [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression). The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation. +This directory contains a module to handle *internal only* cmdlets. Cmdlets that you **hide** in configuration are created here. For more information on hiding, see [cmdlet hiding](https://github.com/Azure/autorest.powershell/blob/main/docs/directives.md#cmdlet-hiding-exportation-suppression). The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation. ## Info - Modifiable: no @@ -11,4 +11,4 @@ This directory contains a module to handle *internal only* cmdlets. Cmdlets that The `Az.Compute.internal.psm1` file is generated to this folder. This module file handles the hidden cmdlets. These cmdlets will not be exported by `Az.Compute`. Instead, this sub-module is imported by the `..\custom\Az.Compute.custom.psm1` module, allowing you to use hidden cmdlets in your custom, exposed cmdlets. To call these cmdlets in your custom scripts, simply use [module-qualified calls](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_command_precedence?view=powershell-6#qualified-names). For example, `Az.Compute.internal\Get-Example` would call an internal cmdlet named `Get-Example`. ## Purpose -This allows you to include REST specifications for services that you *do not wish to expose from your module*, but simply want to call within custom cmdlets. For example, if you want to make a custom cmdlet that uses `Storage` services, you could include a simplified `Storage` REST specification that has only the operations you need. When you run the generator and build this module, note the generated `Storage` cmdlets. Then, in your readme configuration, use [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) on the `Storage` cmdlets and they will *only be exposed to the custom cmdlets* you want to write, and not be exported as part of `Az.Compute`. \ No newline at end of file +This allows you to include REST specifications for services that you *do not wish to expose from your module*, but simply want to call within custom cmdlets. For example, if you want to make a custom cmdlet that uses `Storage` services, you could include a simplified `Storage` REST specification that has only the operations you need. When you run the generator and build this module, note the generated `Storage` cmdlets. Then, in your readme configuration, use [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) on the `Storage` cmdlets and they will *only be exposed to the custom cmdlets* you want to write, and not be exported as part of `Az.Compute`. diff --git a/src/Compute/Compute.Autorest/internal/Update-AzGalleryApplicationVersion.ps1 b/src/Compute/Compute.Autorest/internal/Update-AzGalleryApplicationVersion.ps1 index f4671b75fc2d..b98901842036 100644 --- a/src/Compute/Compute.Autorest/internal/Update-AzGalleryApplicationVersion.ps1 +++ b/src/Compute/Compute.Autorest/internal/Update-AzGalleryApplicationVersion.ps1 @@ -20,18 +20,18 @@ Update a gallery Application Version. .Description Update a gallery Application Version. .Example -PS C:\> $ctx = New-AzStorageContext -StorageAccountName $storAccName -PS C:\> $SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r -PS C:\> $storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName -PS C:\> $blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context -PS C:\> $SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context -PS C:\> $SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken -PS C:\> Update-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -ReplicaCount 3 +$ctx = New-AzStorageContext -StorageAccountName $storAccName +$SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r +$storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName +$blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context +$SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context +$SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken +Update-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -ReplicaCount 3 .Inputs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion .Notes COMPLEX PARAMETER PROPERTIES @@ -53,6 +53,19 @@ INPUTOBJECT : Identity Parameter [VMName ]: The name of the virtual machine where the run command should be created or updated. [VMScaleSetName ]: The name of the VM scale set. +PUBLISHINGPROFILETARGETEXTENDEDLOCATION : The target extended locations where the Image Version is going to be replicated to. This property is updatable. + [EncryptionDataDiskImage ]: A list of encryption specifications for data disk images. + Lun : This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. + [DiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. + [ExtendedLocationName ]: + [ExtendedLocationReplicaCount ]: The number of replicas of the Image Version to be created per extended location. This property is updatable. + [ExtendedLocationType ]: It is type of the extended location. + [Name ]: The name of the region. + [OSDiskImageDiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. + [SecurityProfileConfidentialVMEncryptionType ]: confidential VM encryption types + [SecurityProfileSecureVMDiskEncryptionSetId ]: secure VM disk encryption set id + [StorageAccountType ]: Specifies the storage account type to be used to store the image. This property is not updatable. + TARGETREGION : The target regions where the Image Version is going to be replicated to. This property is updatable. Name : The name of the region. [EncryptionDataDiskImage ]: A list of encryption specifications for data disk images. @@ -60,12 +73,14 @@ TARGETREGION : The target regions where the Image Version is go [DiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. [OSDiskImageDiskEncryptionSetId ]: A relative URI containing the resource ID of the disk encryption set. [RegionalReplicaCount ]: The number of replicas of the Image Version to be created per region. This property is updatable. + [SecurityProfileConfidentialVMEncryptionType ]: confidential VM encryption types + [SecurityProfileSecureVMDiskEncryptionSetId ]: secure VM disk encryption set id [StorageAccountType ]: Specifies the storage account type to be used to store the image. This property is not updatable. .Link https://docs.microsoft.com/powershell/module/az.compute/update-azgalleryapplicationversion #> function Update-AzGalleryApplicationVersion { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -111,6 +126,15 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.String] + # Optional. + # The name to assign the downloaded config file on the VM. + # This is limited to 4096 characters. + # If not specified, the config file will be named the Gallery Application name appended with "_config". + ${ConfigFileName}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] [System.String] @@ -125,6 +149,15 @@ param( # The mediaLink of the artifact, must be a readable storage page blob. ${PackageFileLink}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.String] + # Optional. + # The name to assign the downloaded package file on the VM. + # This is limited to 4096 characters. + # If not specified, the package file will be named the same as the Gallery Application name. + ${PackageFileName}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] [System.DateTime] @@ -149,7 +182,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IUpdateResourceDefinitionTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IUpdateResourceDefinitionTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, @@ -157,7 +190,7 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[]] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[]] # The target regions where the Image Version is going to be replicated to. # This property is updatable. # To construct, see NOTES section for TARGETREGION properties and create a hash table. @@ -230,6 +263,7 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ UpdateExpanded = 'Az.Compute.private\Update-AzGalleryApplicationVersion_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.Compute.private\Update-AzGalleryApplicationVersion_UpdateViaIdentityExpanded'; @@ -243,6 +277,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -251,15 +286,18 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } diff --git a/src/Compute/Compute.Autorest/test/Get-AzGalleryApplication.Recording.json b/src/Compute/Compute.Autorest/test/Get-AzGalleryApplication.Recording.json deleted file mode 100644 index 68fe6b92ce61..000000000000 --- a/src/Compute/Compute.Autorest/test/Get-AzGalleryApplication.Recording.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "Get-AzGalleryApplication+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01+1": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01", - "Content": "{\r\n \"location\": \"EastUS\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "87" ] - } - }, - "Response": { - "StatusCode": 201, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/CreateUpdateGalleryApplication3Min;149,Microsoft.Compute/CreateUpdateGalleryApplication30Min;748" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "ff6dd253-b01a-4164-8cee-17bcac781b7f" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-correlation-request-id": [ "f7052b1d-d5db-4e4f-bd23-4a427629c937" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211101T174812Z:f7052b1d-d5db-4e4f-bd23-4a427629c937" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Mon, 01 Nov 2021 17:48:12 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "366" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplication+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "6acefa7b-f14e-420b-bbe9-da36b8e3f6db" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplication" ], - "FullCommandName": [ "New-AzGalleryApplication_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplication3Min;298,Microsoft.Compute/GetGalleryApplication30Min;1991" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "c5a58af8-7325-478a-9be0-03417b042389" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "ea877a49-8032-4346-b7da-530e4c03ab39" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211101T174843Z:ea877a49-8032-4346-b7da-530e4c03ab39" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Mon, 01 Nov 2021 17:48:43 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "366" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplication+[NoContext]+List Get-AzGalleryApplication+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications?api-version=2021-07-01+1": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "69e2ad0c-ee66-4fa1-8ac5-c65daa5fcdf4" ], - "CommandName": [ "Get-AzGalleryApplication" ], - "FullCommandName": [ "Get-AzGalleryApplication_List" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/ListGalleryApplicationsInGallery3Min;1499,Microsoft.Compute/ListGalleryApplicationsInGallery30Min;9998" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "8a78ac2c-7111-45af-9bd9-7950e831f6cc" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "d9bc3d8a-3943-4f94-ae2d-1fdac027578c" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211101T174843Z:d9bc3d8a-3943-4f94-ae2d-1fdac027578c" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Mon, 01 Nov 2021 17:48:43 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "427" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"value\": [\r\n {\r\n \"name\": \"testgalapp6adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n }\r\n ]\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplication+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01+1": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "76be85a7-69d3-4089-8fc3-349ba495c782" ], - "CommandName": [ "Get-AzGalleryApplication" ], - "FullCommandName": [ "Get-AzGalleryApplication_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplication3Min;297,Microsoft.Compute/GetGalleryApplication30Min;1990" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "6ad4eb6a-c106-44a6-adf7-845ffedd9f7e" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "61b7c4ca-0038-4f18-9994-15434ff50517" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211101T174843Z:61b7c4ca-0038-4f18-9994-15434ff50517" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Mon, 01 Nov 2021 17:48:43 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "366" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplication+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01+1": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "6" ], - "x-ms-client-request-id": [ "734910a1-1f10-4cce-9660-4d4f69f57138" ], - "CommandName": [ "Get-AzGalleryApplication" ], - "FullCommandName": [ "Get-AzGalleryApplication_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplication3Min;296,Microsoft.Compute/GetGalleryApplication30Min;1989" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "9c72db0b-f59b-4508-9eac-4629e07bf036" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "9fad9899-7178-4ab1-8660-2756651059bc" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211101T174843Z:9fad9899-7178-4ab1-8660-2756651059bc" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Mon, 01 Nov 2021 17:48:43 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "366" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplication+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "7" ], - "x-ms-client-request-id": [ "8386450d-f263-4e90-a2f8-38f993e0a5ac" ], - "CommandName": [ "Get-AzGalleryApplication" ], - "FullCommandName": [ "Get-AzGalleryApplication_GetViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplication3Min;295,Microsoft.Compute/GetGalleryApplication30Min;1988" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "7bfc484e-d473-4bd7-ae23-db6cc6c26c11" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "4be55042-eaad-4a3e-b425-9770ffeed55c" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211101T174844Z:4be55042-eaad-4a3e-b425-9770ffeed55c" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Mon, 01 Nov 2021 17:48:44 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "366" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/test/Get-AzGalleryApplication.Tests.ps1 b/src/Compute/Compute.Autorest/test/Get-AzGalleryApplication.Tests.ps1 index 1cd96998031a..b1b2bb95dd74 100644 --- a/src/Compute/Compute.Autorest/test/Get-AzGalleryApplication.Tests.ps1 +++ b/src/Compute/Compute.Autorest/test/Get-AzGalleryApplication.Tests.ps1 @@ -11,7 +11,7 @@ while(-not $mockingPath) { } . ($mockingPath | Select-Object -First 1).FullName -Describe 'Get-AzGalleryApplication' { +Describe 'Get-AzGalleryApplication' -Tag 'LiveOnly' { BeforeAll { $galleryName = "testgallery" + $env.RandomString @@ -21,6 +21,7 @@ Describe 'Get-AzGalleryApplication' { } It 'List Get-AzGalleryApplication' { + Import-Module Az.Compute Write-Host -ForegroundColor Yellow "Checking GalleryApplication Get" $galApp = Get-AzGalleryApplication -ResourceGroupName $env.ResourceGroupName -GalleryName $galleryName Write-Host -ForegroundColor Yellow "Gallery Application Count: " $galApp.Count @@ -28,11 +29,13 @@ Describe 'Get-AzGalleryApplication' { } It 'Get' { + Import-Module Az.Compute $galApp = Get-AzGalleryApplication -ResourceGroupName $env.ResourceGroupName -GalleryName $galleryName -Name $galleryApplicationName $galApp.Count | Should BeGreaterThan 0 } It 'GetViaIdentity' { + Import-Module Az.Compute $galApp = Get-AzGalleryApplication -ResourceGroupName $env.ResourceGroupName -GalleryName $galleryName -Name $galleryApplicationName $galAppId = Get-AzGalleryApplication -InputObject $galApp.Id $galAppId.Count | Should BeGreaterThan 0 diff --git a/src/Compute/Compute.Autorest/test/Get-AzGalleryApplicationVersion.Recording.json b/src/Compute/Compute.Autorest/test/Get-AzGalleryApplicationVersion.Recording.json deleted file mode 100644 index 0cc63b15601f..000000000000 --- a/src/Compute/Compute.Autorest/test/Get-AzGalleryApplicationVersion.Recording.json +++ /dev/null @@ -1,724 +0,0 @@ -{ - "Get-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01+1": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01", - "Content": "{\r\n \"location\": \"EastUS\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "87" ] - } - }, - "Response": { - "StatusCode": 201, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/CreateUpdateGalleryApplication3Min;149,Microsoft.Compute/CreateUpdateGalleryApplication30Min;748" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "c0984f19-1150-4e03-b88c-121ceeeaaa02" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-correlation-request-id": [ "2de741c4-83bd-4659-92fd-cdb08c4e035c" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T163411Z:2de741c4-83bd-4659-92fd-cdb08c4e035c" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 16:34:11 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "366" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "be8061b2-29ea-42f5-b3b8-c4217b12e183" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplication" ], - "FullCommandName": [ "New-AzGalleryApplication_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplication3Min;298,Microsoft.Compute/GetGalleryApplication30Min;1994" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "b585b71a-1ea1-4c40-8a82-13786e966d41" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "5880358f-a835-437e-813a-0294d9bee997" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T163441Z:5880358f-a835-437e-813a-0294d9bee997" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 16:34:41 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "366" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k/versions/0.1.0?api-version=2021-07-01+3": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k/versions/0.1.0?api-version=2021-07-01", - "Content": "{\r\n \"location\": \"EastUS\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k.blob.core.windows.net/container6adgv70k/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \\u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n }\r\n }\r\n }\r\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "413" ] - } - }, - "Response": { - "StatusCode": 201, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/9012f30a-e147-4346-862d-713a7c312b66?api-version=2021-07-01" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/CreateUpdateGalleryApplicationVersion3Min;149,Microsoft.Compute/CreateUpdateGalleryApplicationVersion30Min;746" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "9012f30a-e147-4346-862d-713a7c312b66" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], - "x-ms-correlation-request-id": [ "0bd79273-3656-43f4-af34-e192cc6c765f" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T163507Z:0bd79273-3656-43f4-af34-e192cc6c765f" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 16:35:06 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1107" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"0.1.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k/versions/0.1.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k.blob.core.windows.net/container6adgv70k/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-30T16:35:07.3559609+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/9012f30a-e147-4346-862d-713a7c312b66?api-version=2021-07-01+4": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/9012f30a-e147-4346-862d-713a7c312b66?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "e3cae7bf-1e33-4a03-81e3-05eeeccbdbd5" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1196,Microsoft.Compute/GetOperationStatus30Min;4194" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "d908e9a1-6000-43e8-b7c2-11539419985a" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "fec5b7a6-3f8c-4edb-9443-35d2c8ac6e34" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T163537Z:fec5b7a6-3f8c-4edb-9443-35d2c8ac6e34" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 16:35:37 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-30T16:35:07.3403551+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"9012f30a-e147-4346-862d-713a7c312b66\"\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/9012f30a-e147-4346-862d-713a7c312b66?api-version=2021-07-01+5": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/9012f30a-e147-4346-862d-713a7c312b66?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "6" ], - "x-ms-client-request-id": [ "e3cae7bf-1e33-4a03-81e3-05eeeccbdbd5" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1193,Microsoft.Compute/GetOperationStatus30Min;4191" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "54f5993a-10d1-4ae8-906d-4c47b181f776" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "a586a8cb-0630-44b7-9719-6e5412e59142" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T163607Z:a586a8cb-0630-44b7-9719-6e5412e59142" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 16:36:07 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-30T16:35:07.3403551+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"9012f30a-e147-4346-862d-713a7c312b66\"\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/9012f30a-e147-4346-862d-713a7c312b66?api-version=2021-07-01+6": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/9012f30a-e147-4346-862d-713a7c312b66?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "7" ], - "x-ms-client-request-id": [ "e3cae7bf-1e33-4a03-81e3-05eeeccbdbd5" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1191,Microsoft.Compute/GetOperationStatus30Min;4188" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "e87ff81c-c0ce-46e1-9065-1a7d18fc6b7d" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "991c48b8-3b7c-46a4-abd2-d8b4961bf1eb" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T163638Z:991c48b8-3b7c-46a4-abd2-d8b4961bf1eb" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 16:36:37 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-30T16:35:07.3403551+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"9012f30a-e147-4346-862d-713a7c312b66\"\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/9012f30a-e147-4346-862d-713a7c312b66?api-version=2021-07-01+7": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/9012f30a-e147-4346-862d-713a7c312b66?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "8" ], - "x-ms-client-request-id": [ "e3cae7bf-1e33-4a03-81e3-05eeeccbdbd5" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1189,Microsoft.Compute/GetOperationStatus30Min;4185" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "628e4847-87de-405c-8c1e-b6047fa1682f" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "71bb4f80-133f-477c-b577-7897827f024e" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T163708Z:71bb4f80-133f-477c-b577-7897827f024e" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 16:37:07 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-30T16:35:07.3403551+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"9012f30a-e147-4346-862d-713a7c312b66\"\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/9012f30a-e147-4346-862d-713a7c312b66?api-version=2021-07-01+8": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/9012f30a-e147-4346-862d-713a7c312b66?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "9" ], - "x-ms-client-request-id": [ "e3cae7bf-1e33-4a03-81e3-05eeeccbdbd5" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1187,Microsoft.Compute/GetOperationStatus30Min;4183" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "92f74f20-576c-44ff-ac2b-c7d915181be4" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "64f69cf8-7165-4274-9608-d03dbdc87623" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T163738Z:64f69cf8-7165-4274-9608-d03dbdc87623" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 16:37:37 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-30T16:35:07.3403551+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"9012f30a-e147-4346-862d-713a7c312b66\"\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/9012f30a-e147-4346-862d-713a7c312b66?api-version=2021-07-01+9": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/9012f30a-e147-4346-862d-713a7c312b66?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "10" ], - "x-ms-client-request-id": [ "e3cae7bf-1e33-4a03-81e3-05eeeccbdbd5" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1185,Microsoft.Compute/GetOperationStatus30Min;4180" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "420417ba-a28e-4d20-8a6a-0a7fa7530bf2" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "68e6ce74-e790-401a-8e61-c291e29c8c43" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T163808Z:68e6ce74-e790-401a-8e61-c291e29c8c43" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 16:38:08 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-30T16:35:07.3403551+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"9012f30a-e147-4346-862d-713a7c312b66\"\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/9012f30a-e147-4346-862d-713a7c312b66?api-version=2021-07-01+10": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/9012f30a-e147-4346-862d-713a7c312b66?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "11" ], - "x-ms-client-request-id": [ "e3cae7bf-1e33-4a03-81e3-05eeeccbdbd5" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1185,Microsoft.Compute/GetOperationStatus30Min;4177" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "2b2d6dc2-d54a-4985-a55e-3aa29c8a9cda" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-correlation-request-id": [ "b0de290c-fefe-4ddd-b490-7d22c5860602" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T163838Z:b0de290c-fefe-4ddd-b490-7d22c5860602" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 16:38:38 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-30T16:35:07.3403551+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"9012f30a-e147-4346-862d-713a7c312b66\"\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/9012f30a-e147-4346-862d-713a7c312b66?api-version=2021-07-01+11": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/9012f30a-e147-4346-862d-713a7c312b66?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "12" ], - "x-ms-client-request-id": [ "e3cae7bf-1e33-4a03-81e3-05eeeccbdbd5" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1184,Microsoft.Compute/GetOperationStatus30Min;4174" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "f70077ed-9f45-43f3-8781-991c15bad0dd" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], - "x-ms-correlation-request-id": [ "26cdd1c4-c45d-4029-b0d3-a37d8ad99c1e" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T163910Z:26cdd1c4-c45d-4029-b0d3-a37d8ad99c1e" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 16:39:10 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-30T16:35:07.3403551+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"9012f30a-e147-4346-862d-713a7c312b66\"\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/9012f30a-e147-4346-862d-713a7c312b66?api-version=2021-07-01+12": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/9012f30a-e147-4346-862d-713a7c312b66?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "13" ], - "x-ms-client-request-id": [ "e3cae7bf-1e33-4a03-81e3-05eeeccbdbd5" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1184,Microsoft.Compute/GetOperationStatus30Min;4171" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "3655c3fa-83d5-48d9-a087-9735330e8808" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "fda426fc-1dea-4619-a88e-c6f12b789b87" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T163940Z:fda426fc-1dea-4619-a88e-c6f12b789b87" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 16:39:40 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "184" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-30T16:35:07.3403551+00:00\",\r\n \"endTime\": \"2021-10-30T16:39:37.5141671+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"name\": \"9012f30a-e147-4346-862d-713a7c312b66\"\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k/versions/0.1.0?api-version=2021-07-01+13": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k/versions/0.1.0?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "14" ], - "x-ms-client-request-id": [ "e3cae7bf-1e33-4a03-81e3-05eeeccbdbd5" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplicationVersion3Min;1999,Microsoft.Compute/GetGalleryApplicationVersion30Min;9998" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "8642b45d-63c2-4105-a760-5b9ef9346373" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], - "x-ms-correlation-request-id": [ "d02aa2a0-7fb7-42e4-9217-ef35829ea82a" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T163941Z:d02aa2a0-7fb7-42e4-9217-ef35829ea82a" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 16:39:40 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1108" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"0.1.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k/versions/0.1.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k.blob.core.windows.net/container6adgv70k/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-30T16:35:07.3559609+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplicationVersion+[NoContext]+List+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k/versions?api-version=2021-07-01+1": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k/versions?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "15" ], - "x-ms-client-request-id": [ "7204bd00-cb9e-4fd3-b606-57fa13fb4b9e" ], - "CommandName": [ "Get-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Get-AzGalleryApplicationVersion_List" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/ListGalleryApplicationVersionsInGalleryApplication3Min;1499,Microsoft.Compute/ListGalleryApplicationVersionsInGalleryApplication30Min;9999" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "fb9f45ee-45a2-4f69-86ab-e1a892d2b33e" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], - "x-ms-correlation-request-id": [ "2fdb0529-6e54-442f-89db-3666a151503c" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T163941Z:2fdb0529-6e54-442f-89db-3666a151503c" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 16:39:40 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1253" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"value\": [\r\n {\r\n \"name\": \"0.1.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k/versions/0.1.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k.blob.core.windows.net/container6adgv70k/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-30T16:35:07.3559609+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplicationVersion+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k/versions/0.1.0?api-version=2021-07-01+1": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k/versions/0.1.0?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "16" ], - "x-ms-client-request-id": [ "8de99dfd-b73e-44ee-a6f3-036c08440311" ], - "CommandName": [ "Get-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Get-AzGalleryApplicationVersion_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplicationVersion3Min;1998,Microsoft.Compute/GetGalleryApplicationVersion30Min;9997" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "a73651ac-b1a4-421f-8e4e-1d834f29b6b7" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11986" ], - "x-ms-correlation-request-id": [ "999d610a-5752-4433-97ca-a4b138880307" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T163941Z:999d610a-5752-4433-97ca-a4b138880307" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 16:39:41 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1108" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"0.1.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k/versions/0.1.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k.blob.core.windows.net/container6adgv70k/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-30T16:35:07.3559609+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplicationVersion+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k/versions/0.1.0?api-version=2021-07-01+1": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k/versions/0.1.0?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "17" ], - "x-ms-client-request-id": [ "8b95d3d6-2976-4093-9932-122e2dd107da" ], - "CommandName": [ "Get-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Get-AzGalleryApplicationVersion_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplicationVersion3Min;1997,Microsoft.Compute/GetGalleryApplicationVersion30Min;9996" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "b84477ad-7f5c-4f09-abfd-8cf85578a5f8" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11985" ], - "x-ms-correlation-request-id": [ "9f7493f1-b7f9-4157-bab8-bf73010b668e" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T163942Z:9f7493f1-b7f9-4157-bab8-bf73010b668e" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 16:39:41 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1108" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"0.1.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k/versions/0.1.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k.blob.core.windows.net/container6adgv70k/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-30T16:35:07.3559609+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Get-AzGalleryApplicationVersion+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k/versions/0.1.0?api-version=2021-07-01+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k/versions/0.1.0?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "18" ], - "x-ms-client-request-id": [ "cfed6ced-d73b-4a1b-9aa5-3f458a471a23" ], - "CommandName": [ "Get-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Get-AzGalleryApplicationVersion_GetViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplicationVersion3Min;1996,Microsoft.Compute/GetGalleryApplicationVersion30Min;9995" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "45c47f00-2d68-4527-882f-239934256002" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11984" ], - "x-ms-correlation-request-id": [ "ba83d8ce-3cf1-4aaa-9d83-6d9e47ef5ad7" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T163942Z:ba83d8ce-3cf1-4aaa-9d83-6d9e47ef5ad7" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 16:39:41 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1108" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"0.1.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k/versions/0.1.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k.blob.core.windows.net/container6adgv70k/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-30T16:35:07.3559609+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "isContentBase64": false - } - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/test/Get-AzGalleryApplicationVersion.Tests.ps1 b/src/Compute/Compute.Autorest/test/Get-AzGalleryApplicationVersion.Tests.ps1 index 65048ad7920a..117b24232f89 100644 --- a/src/Compute/Compute.Autorest/test/Get-AzGalleryApplicationVersion.Tests.ps1 +++ b/src/Compute/Compute.Autorest/test/Get-AzGalleryApplicationVersion.Tests.ps1 @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzGalleryApplicationVersi . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Get-AzGalleryApplicationVersion' { +Describe 'Get-AzGalleryApplicationVersion' -Tag 'LiveOnly'{ BeforeAll { $galleryName = "testgallery" + $env.RandomString diff --git a/src/Compute/Compute.Autorest/test/New-AzGalleryApplication.Recording.json b/src/Compute/Compute.Autorest/test/New-AzGalleryApplication.Recording.json deleted file mode 100644 index d421e382cdb6..000000000000 --- a/src/Compute/Compute.Autorest/test/New-AzGalleryApplication.Recording.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "New-AzGalleryApplication+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01+1": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01", - "Content": "{\r\n \"location\": \"EastUS\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "87" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/CreateUpdateGalleryApplication3Min;148,Microsoft.Compute/CreateUpdateGalleryApplication30Min;747" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132701620474740484,70d5434e-5504-4968-b956-f8d027c07083_132701620474740484" ], - "x-ms-request-id": [ "4ff5dfb2-947e-4cbb-b5e6-02c5c46819b1" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], - "x-ms-correlation-request-id": [ "d4c17939-df3d-489f-b2d7-dcba6dd92de6" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211027T180112Z:d4c17939-df3d-489f-b2d7-dcba6dd92de6" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Wed, 27 Oct 2021 18:01:11 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "366" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "New-AzGalleryApplication+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "9" ], - "x-ms-client-request-id": [ "64ac2579-0b7b-4c82-8cc7-2be9976f9b7a" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplication" ], - "FullCommandName": [ "New-AzGalleryApplication_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplication3Min;293,Microsoft.Compute/GetGalleryApplication30Min;1986" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132701620474740484,70d5434e-5504-4968-b956-f8d027c07083_132701620474740484" ], - "x-ms-request-id": [ "c3d77dcf-80aa-4bbc-ae6f-9c97d1a9d3ca" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11982" ], - "x-ms-correlation-request-id": [ "ff5c8ef5-a879-4670-825a-af053f530c28" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211027T180142Z:ff5c8ef5-a879-4670-825a-af053f530c28" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Wed, 27 Oct 2021 18:01:41 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "366" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "New-AzGalleryApplication+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01+3": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "10" ], - "x-ms-client-request-id": [ "ba00a599-f2f8-4a81-a1d5-0447ecdeec38" ], - "CommandName": [ "Get-AzGalleryApplication" ], - "FullCommandName": [ "Get-AzGalleryApplication_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplication3Min;292,Microsoft.Compute/GetGalleryApplication30Min;1985" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132701620474740484,70d5434e-5504-4968-b956-f8d027c07083_132701620474740484" ], - "x-ms-request-id": [ "445f5dc7-c9e6-4105-9cc2-5cb431865268" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11981" ], - "x-ms-correlation-request-id": [ "f44c8e72-920e-4be4-a375-7aac5cdce333" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211027T180142Z:f44c8e72-920e-4be4-a375-7aac5cdce333" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Wed, 27 Oct 2021 18:01:41 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "366" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/test/New-AzGalleryApplication.Tests.ps1 b/src/Compute/Compute.Autorest/test/New-AzGalleryApplication.Tests.ps1 index 4bf4c5b4ce8e..ae6d8d1b060d 100644 --- a/src/Compute/Compute.Autorest/test/New-AzGalleryApplication.Tests.ps1 +++ b/src/Compute/Compute.Autorest/test/New-AzGalleryApplication.Tests.ps1 @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'New-AzGalleryApplication')) . ($mockingPath | Select-Object -First 1).FullName } -Describe 'New-AzGalleryApplication' { +Describe 'New-AzGalleryApplication' -Tag 'LiveOnly'{ It 'CreateExpanded' { $galleryName = "testgallery" + $env.RandomString $galleryApplicationName = "testgalapp" + $env.RandomString diff --git a/src/Compute/Compute.Autorest/test/New-AzGalleryApplicationVersion.Recording.json b/src/Compute/Compute.Autorest/test/New-AzGalleryApplicationVersion.Recording.json deleted file mode 100644 index a33ae0ad3ca6..000000000000 --- a/src/Compute/Compute.Autorest/test/New-AzGalleryApplicationVersion.Recording.json +++ /dev/null @@ -1,595 +0,0 @@ -{ - "New-AzGalleryApplicationVersion+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k1/applications/testgalapp6adgv70k1?api-version=2021-07-01+1": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k1/applications/testgalapp6adgv70k1?api-version=2021-07-01", - "Content": "{\r\n \"location\": \"EastUS\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "87" ] - } - }, - "Response": { - "StatusCode": 201, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/CreateUpdateGalleryApplication3Min;149,Microsoft.Compute/CreateUpdateGalleryApplication30Min;749" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "99234ffe-8a2f-4d39-8487-c78fbf638a2f" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "e560dfa9-416a-4bb8-aa68-2b55e91064f5" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T174805Z:e560dfa9-416a-4bb8-aa68-2b55e91064f5" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 17:48:05 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "369" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k1\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k1/applications/testgalapp6adgv70k1\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "New-AzGalleryApplicationVersion+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k1/applications/testgalapp6adgv70k1?api-version=2021-07-01+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k1/applications/testgalapp6adgv70k1?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "a602c7ae-a13b-4494-9458-d2f8ed1ad062" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplication" ], - "FullCommandName": [ "New-AzGalleryApplication_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplication3Min;298,Microsoft.Compute/GetGalleryApplication30Min;1998" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "c33983ab-a897-4849-b63b-9694d60b07a7" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-correlation-request-id": [ "24b09642-c37d-4b8a-86d4-c7aacd1a6f93" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T174835Z:24b09642-c37d-4b8a-86d4-c7aacd1a6f93" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 17:48:35 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "369" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k1\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k1/applications/testgalapp6adgv70k1\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "New-AzGalleryApplicationVersion+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k1/applications/testgalapp6adgv70k1/versions/0.1.0?api-version=2021-07-01+3": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k1/applications/testgalapp6adgv70k1/versions/0.1.0?api-version=2021-07-01", - "Content": "{\r\n \"location\": \"EastUS\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k1.blob.core.windows.net/container6adgv70k1/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \\u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n }\r\n }\r\n }\r\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "415" ] - } - }, - "Response": { - "StatusCode": 201, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/697c70f8-c847-44d2-83de-cc84bc679379?api-version=2021-07-01" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/CreateUpdateGalleryApplicationVersion3Min;149,Microsoft.Compute/CreateUpdateGalleryApplicationVersion30Min;749" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "697c70f8-c847-44d2-83de-cc84bc679379" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-correlation-request-id": [ "5a5e3ffc-9a77-4ad4-ae25-ccc219cbafe3" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T174900Z:5a5e3ffc-9a77-4ad4-ae25-ccc219cbafe3" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 17:49:00 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1111" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"0.1.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k1/applications/testgalapp6adgv70k1/versions/0.1.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k1.blob.core.windows.net/container6adgv70k1/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-30T17:49:00.7935482+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "New-AzGalleryApplicationVersion+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/697c70f8-c847-44d2-83de-cc84bc679379?api-version=2021-07-01+4": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/697c70f8-c847-44d2-83de-cc84bc679379?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "c95e1efb-68d1-4001-9384-2d933b6360a3" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1196,Microsoft.Compute/GetOperationStatus30Min;4196" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "3df587c5-4682-44a8-bb43-4987a5d75c50" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "14284770-7a9d-4281-839f-896fb01fe60b" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T174931Z:14284770-7a9d-4281-839f-896fb01fe60b" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 17:49:30 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-30T17:49:00.7935482+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"697c70f8-c847-44d2-83de-cc84bc679379\"\r\n}", - "isContentBase64": false - } - }, - "New-AzGalleryApplicationVersion+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/697c70f8-c847-44d2-83de-cc84bc679379?api-version=2021-07-01+5": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/697c70f8-c847-44d2-83de-cc84bc679379?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "6" ], - "x-ms-client-request-id": [ "c95e1efb-68d1-4001-9384-2d933b6360a3" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1193,Microsoft.Compute/GetOperationStatus30Min;4193" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "d3bfffea-22a5-431b-80cd-ecd8fd306099" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "71856adf-163c-4aee-ba1e-6a416ad46f34" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T175001Z:71856adf-163c-4aee-ba1e-6a416ad46f34" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 17:50:01 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-30T17:49:00.7935482+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"697c70f8-c847-44d2-83de-cc84bc679379\"\r\n}", - "isContentBase64": false - } - }, - "New-AzGalleryApplicationVersion+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/697c70f8-c847-44d2-83de-cc84bc679379?api-version=2021-07-01+6": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/697c70f8-c847-44d2-83de-cc84bc679379?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "7" ], - "x-ms-client-request-id": [ "c95e1efb-68d1-4001-9384-2d933b6360a3" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1191,Microsoft.Compute/GetOperationStatus30Min;4190" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "0b05cb79-5623-4bae-a284-aecdeb2a3135" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "037000c1-216b-430a-8e1a-b3fe82fd6851" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T175031Z:037000c1-216b-430a-8e1a-b3fe82fd6851" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 17:50:30 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-30T17:49:00.7935482+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"697c70f8-c847-44d2-83de-cc84bc679379\"\r\n}", - "isContentBase64": false - } - }, - "New-AzGalleryApplicationVersion+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/697c70f8-c847-44d2-83de-cc84bc679379?api-version=2021-07-01+7": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/697c70f8-c847-44d2-83de-cc84bc679379?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "8" ], - "x-ms-client-request-id": [ "c95e1efb-68d1-4001-9384-2d933b6360a3" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1189,Microsoft.Compute/GetOperationStatus30Min;4187" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "f2c2dfdf-7a3c-44d1-86ed-2f55646e2c20" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "32bc2b0d-8dac-4b7d-b135-e0490f72e463" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T175101Z:32bc2b0d-8dac-4b7d-b135-e0490f72e463" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 17:51:00 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-30T17:49:00.7935482+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"697c70f8-c847-44d2-83de-cc84bc679379\"\r\n}", - "isContentBase64": false - } - }, - "New-AzGalleryApplicationVersion+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/697c70f8-c847-44d2-83de-cc84bc679379?api-version=2021-07-01+8": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/697c70f8-c847-44d2-83de-cc84bc679379?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "9" ], - "x-ms-client-request-id": [ "c95e1efb-68d1-4001-9384-2d933b6360a3" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1186,Microsoft.Compute/GetOperationStatus30Min;4184" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "43603f43-299e-473e-a316-d742fed6df63" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "49d6ac96-f125-4408-892b-da3000d543a1" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T175131Z:49d6ac96-f125-4408-892b-da3000d543a1" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 17:51:31 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-30T17:49:00.7935482+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"697c70f8-c847-44d2-83de-cc84bc679379\"\r\n}", - "isContentBase64": false - } - }, - "New-AzGalleryApplicationVersion+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/697c70f8-c847-44d2-83de-cc84bc679379?api-version=2021-07-01+9": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/697c70f8-c847-44d2-83de-cc84bc679379?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "10" ], - "x-ms-client-request-id": [ "c95e1efb-68d1-4001-9384-2d933b6360a3" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1184,Microsoft.Compute/GetOperationStatus30Min;4181" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "0f3f415a-1eaf-4377-abc2-da29a5bf33bf" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "63868103-937c-44bf-997f-f270e098be97" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T175202Z:63868103-937c-44bf-997f-f270e098be97" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 17:52:01 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-30T17:49:00.7935482+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"697c70f8-c847-44d2-83de-cc84bc679379\"\r\n}", - "isContentBase64": false - } - }, - "New-AzGalleryApplicationVersion+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/697c70f8-c847-44d2-83de-cc84bc679379?api-version=2021-07-01+10": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/697c70f8-c847-44d2-83de-cc84bc679379?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "11" ], - "x-ms-client-request-id": [ "c95e1efb-68d1-4001-9384-2d933b6360a3" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1185,Microsoft.Compute/GetOperationStatus30Min;4179" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "3f6e5200-3cba-48b4-9008-f899b9ee1c19" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "3ce649db-7ab3-4970-9dfb-d350213e7e9e" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T175232Z:3ce649db-7ab3-4970-9dfb-d350213e7e9e" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 17:52:31 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-30T17:49:00.7935482+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"697c70f8-c847-44d2-83de-cc84bc679379\"\r\n}", - "isContentBase64": false - } - }, - "New-AzGalleryApplicationVersion+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/697c70f8-c847-44d2-83de-cc84bc679379?api-version=2021-07-01+11": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/697c70f8-c847-44d2-83de-cc84bc679379?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "12" ], - "x-ms-client-request-id": [ "c95e1efb-68d1-4001-9384-2d933b6360a3" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1185,Microsoft.Compute/GetOperationStatus30Min;4176" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "2cbb1f3d-20ef-4cf6-8250-afbacc109a64" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-correlation-request-id": [ "d3dbcbab-e42b-4443-9438-3f6a3342c91b" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T175302Z:d3dbcbab-e42b-4443-9438-3f6a3342c91b" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 17:53:02 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-30T17:49:00.7935482+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"697c70f8-c847-44d2-83de-cc84bc679379\"\r\n}", - "isContentBase64": false - } - }, - "New-AzGalleryApplicationVersion+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/697c70f8-c847-44d2-83de-cc84bc679379?api-version=2021-07-01+12": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/697c70f8-c847-44d2-83de-cc84bc679379?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "13" ], - "x-ms-client-request-id": [ "c95e1efb-68d1-4001-9384-2d933b6360a3" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1185,Microsoft.Compute/GetOperationStatus30Min;4173" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "002ce1bc-bb12-4f38-93d3-aeef3deaccfc" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], - "x-ms-correlation-request-id": [ "c88e59f5-99b7-480d-9c9b-e6034bba6229" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T175332Z:c88e59f5-99b7-480d-9c9b-e6034bba6229" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 17:53:32 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "184" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-30T17:49:00.7935482+00:00\",\r\n \"endTime\": \"2021-10-30T17:53:30.9673818+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"name\": \"697c70f8-c847-44d2-83de-cc84bc679379\"\r\n}", - "isContentBase64": false - } - }, - "New-AzGalleryApplicationVersion+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k1/applications/testgalapp6adgv70k1/versions/0.1.0?api-version=2021-07-01+13": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k1/applications/testgalapp6adgv70k1/versions/0.1.0?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "14" ], - "x-ms-client-request-id": [ "c95e1efb-68d1-4001-9384-2d933b6360a3" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplicationVersion3Min;1999,Microsoft.Compute/GetGalleryApplicationVersion30Min;9999" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "33449d0f-c2c3-4564-b4f0-d86fc43ac29f" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], - "x-ms-correlation-request-id": [ "dc2f9fd3-2848-46f1-a13c-7ed1d076ae45" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T175332Z:dc2f9fd3-2848-46f1-a13c-7ed1d076ae45" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 17:53:32 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1112" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"0.1.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k1/applications/testgalapp6adgv70k1/versions/0.1.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k1.blob.core.windows.net/container6adgv70k1/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-30T17:49:00.7935482+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "New-AzGalleryApplicationVersion+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k1/applications/testgalapp6adgv70k1/versions?api-version=2021-07-01+14": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k1/applications/testgalapp6adgv70k1/versions?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "15" ], - "x-ms-client-request-id": [ "b905ea20-0758-48e1-871f-0d71093904df" ], - "CommandName": [ "Get-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Get-AzGalleryApplicationVersion_List" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/ListGalleryApplicationVersionsInGalleryApplication3Min;1499,Microsoft.Compute/ListGalleryApplicationVersionsInGalleryApplication30Min;9999" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "7966d5e4-6610-4155-ad47-7df6afb67081" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], - "x-ms-correlation-request-id": [ "d600f9a3-046b-4e33-9759-737e245b99fb" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211030T175333Z:d600f9a3-046b-4e33-9759-737e245b99fb" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sat, 30 Oct 2021 17:53:32 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1257" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"value\": [\r\n {\r\n \"name\": \"0.1.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k1/applications/testgalapp6adgv70k1/versions/0.1.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k1.blob.core.windows.net/container6adgv70k1/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-30T17:49:00.7935482+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "isContentBase64": false - } - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/test/New-AzGalleryApplicationVersion.Tests.ps1 b/src/Compute/Compute.Autorest/test/New-AzGalleryApplicationVersion.Tests.ps1 index 87f2cffc2f87..068f9880b50f 100644 --- a/src/Compute/Compute.Autorest/test/New-AzGalleryApplicationVersion.Tests.ps1 +++ b/src/Compute/Compute.Autorest/test/New-AzGalleryApplicationVersion.Tests.ps1 @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'New-AzGalleryApplicationVersi . ($mockingPath | Select-Object -First 1).FullName } -Describe 'New-AzGalleryApplicationVersion' { +Describe 'New-AzGalleryApplicationVersion' -Tag 'LiveOnly'{ It 'CreateExpanded' { $env.RandomString = $env.RandomString + "1" $galleryName = "testgallery" + $env.RandomString diff --git a/src/Compute/Compute.Autorest/test/Remove-AzGalleryApplication.Recording.json b/src/Compute/Compute.Autorest/test/Remove-AzGalleryApplication.Recording.json deleted file mode 100644 index e687aacc94d0..000000000000 --- a/src/Compute/Compute.Autorest/test/Remove-AzGalleryApplication.Recording.json +++ /dev/null @@ -1,420 +0,0 @@ -{ - "Remove-AzGalleryApplication+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp16adgv70k?api-version=2021-07-01+1": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp16adgv70k?api-version=2021-07-01", - "Content": "{\r\n \"location\": \"EastUS\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "87" ] - } - }, - "Response": { - "StatusCode": 201, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/CreateUpdateGalleryApplication3Min;149,Microsoft.Compute/CreateUpdateGalleryApplication30Min;749" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "17e39fe2-8224-497c-a698-bf1cf8144c39" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "3de5752c-765a-4a7d-bdde-140f70230600" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211028T122054Z:3de5752c-765a-4a7d-bdde-140f70230600" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 28 Oct 2021 12:20:54 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "368" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp16adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp16adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplication+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp16adgv70k?api-version=2021-07-01+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp16adgv70k?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "4b33710f-2f82-4a2a-a339-e9105be74645" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplication" ], - "FullCommandName": [ "New-AzGalleryApplication_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplication3Min;298,Microsoft.Compute/GetGalleryApplication30Min;1998" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "a99194e2-4ed9-41a4-a36e-b94b148629a1" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-correlation-request-id": [ "f3580204-7fd8-44f7-8526-a9d714a19d43" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211028T122125Z:f3580204-7fd8-44f7-8526-a9d714a19d43" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 28 Oct 2021 12:21:24 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "368" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp16adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp16adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplication+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp26adgv70k?api-version=2021-07-01+3": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp26adgv70k?api-version=2021-07-01", - "Content": "{\r\n \"location\": \"EastUS\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "87" ] - } - }, - "Response": { - "StatusCode": 201, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/CreateUpdateGalleryApplication3Min;148,Microsoft.Compute/CreateUpdateGalleryApplication30Min;748" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "43ef86e6-abaa-46f4-80d2-8635b1ea33ee" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-correlation-request-id": [ "cbea65ac-d804-4df1-85e8-618cfec44817" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211028T122125Z:cbea65ac-d804-4df1-85e8-618cfec44817" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 28 Oct 2021 12:21:25 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "368" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp26adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp26adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplication+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp26adgv70k?api-version=2021-07-01+4": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp26adgv70k?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "2b2a2799-c2eb-4f39-bc17-c457c100b0d4" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplication" ], - "FullCommandName": [ "New-AzGalleryApplication_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplication3Min;296,Microsoft.Compute/GetGalleryApplication30Min;1996" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "1f3638f7-e738-47f7-9897-6489b4316cd9" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "cb4e82f2-4774-44d4-83dd-67f154255c04" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211028T122155Z:cb4e82f2-4774-44d4-83dd-67f154255c04" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 28 Oct 2021 12:21:54 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "368" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp26adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp26adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplication+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp16adgv70k?api-version=2021-07-01+1": { - "Request": { - "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp16adgv70k?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "6" ], - "x-ms-client-request-id": [ "3cc9c5ba-1f7b-4b45-a862-7bc5c933a8c7" ], - "CommandName": [ "Remove-AzGalleryApplication" ], - "FullCommandName": [ "Remove-AzGalleryApplication_Delete" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/DeleteGalleryApplication3Min;49,Microsoft.Compute/DeleteGalleryApplication30Min;299" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "3d68ee12-b261-451f-bb34-cf0290e38fc4" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-correlation-request-id": [ "8c0d5dd8-0d78-469b-995e-40e7fa81e56a" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211028T122155Z:8c0d5dd8-0d78-469b-995e-40e7fa81e56a" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 28 Oct 2021 12:21:55 GMT" ] - }, - "ContentHeaders": { - "Expires": [ "-1" ], - "Content-Length": [ "0" ] - }, - "Content": null, - "isContentBase64": false - } - }, - "Remove-AzGalleryApplication+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications?api-version=2021-07-01+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "7" ], - "x-ms-client-request-id": [ "2cb86fa5-b9b9-4a8f-aa55-2b6c0f62e75c" ], - "CommandName": [ "Get-AzGalleryApplication" ], - "FullCommandName": [ "Get-AzGalleryApplication_List" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/ListGalleryApplicationsInGallery3Min;1499,Microsoft.Compute/ListGalleryApplicationsInGallery30Min;9999" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "492734ef-8efa-4700-9c16-4f21421613a6" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "78bc614d-b16d-4587-a293-a96dbe20735e" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211028T122156Z:78bc614d-b16d-4587-a293-a96dbe20735e" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 28 Oct 2021 12:21:55 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "429" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"value\": [\r\n {\r\n \"name\": \"testgalapp26adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp26adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n }\r\n ]\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplication+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp26adgv70k?api-version=2021-07-01+1": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp26adgv70k?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "8" ], - "x-ms-client-request-id": [ "aa01ee56-31e3-436b-a90f-143b0977e14f" ], - "CommandName": [ "Get-AzGalleryApplication" ], - "FullCommandName": [ "Get-AzGalleryApplication_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplication3Min;295,Microsoft.Compute/GetGalleryApplication30Min;1995" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "dbc37cc1-c7f5-4730-9fd5-592360d25bad" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "41f767d5-d785-4711-9b09-e786a5819330" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211028T122156Z:41f767d5-d785-4711-9b09-e786a5819330" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 28 Oct 2021 12:21:55 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "368" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp26adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp26adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplication+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications?api-version=2021-07-01+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "9" ], - "x-ms-client-request-id": [ "b73e4a53-2b38-4360-8bcf-e3612d022404" ], - "CommandName": [ "Get-AzGalleryApplication" ], - "FullCommandName": [ "Get-AzGalleryApplication_List" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/ListGalleryApplicationsInGallery3Min;1498,Microsoft.Compute/ListGalleryApplicationsInGallery30Min;9998" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "0984235d-4055-4a42-9a05-8cb937799f41" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "912b0b53-d659-4b62-ba98-45b94f96243f" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211028T122156Z:912b0b53-d659-4b62-ba98-45b94f96243f" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 28 Oct 2021 12:21:56 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "429" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"value\": [\r\n {\r\n \"name\": \"testgalapp26adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp26adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n }\r\n ]\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplication+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp26adgv70k?api-version=2021-07-01+3": { - "Request": { - "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp26adgv70k?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "10" ], - "x-ms-client-request-id": [ "031590a3-175e-469a-bb93-9a72f385539c" ], - "CommandName": [ "Remove-AzGalleryApplication" ], - "FullCommandName": [ "Remove-AzGalleryApplication_DeleteViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/DeleteGalleryApplication3Min;48,Microsoft.Compute/DeleteGalleryApplication30Min;298" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "0c1fd02b-29f5-4f73-b76f-db241eda1abc" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], - "x-ms-correlation-request-id": [ "ee0fbe20-60c7-4808-b27b-47b72ba60b3a" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211028T122156Z:ee0fbe20-60c7-4808-b27b-47b72ba60b3a" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 28 Oct 2021 12:21:56 GMT" ] - }, - "ContentHeaders": { - "Expires": [ "-1" ], - "Content-Length": [ "0" ] - }, - "Content": null, - "isContentBase64": false - } - }, - "Remove-AzGalleryApplication+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications?api-version=2021-07-01+4": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "11" ], - "x-ms-client-request-id": [ "d2809a45-7e12-4317-a62a-e7bdb7bfb77a" ], - "CommandName": [ "Get-AzGalleryApplication" ], - "FullCommandName": [ "Get-AzGalleryApplication_List" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/ListGalleryApplicationsInGallery3Min;1497,Microsoft.Compute/ListGalleryApplicationsInGallery30Min;9997" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "07a7aa4f-4704-4fed-84f5-7bc350a013e4" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "d5bbfc7e-fbf4-402a-8af9-978f3f7b41dc" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211028T122157Z:d5bbfc7e-fbf4-402a-8af9-978f3f7b41dc" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 28 Oct 2021 12:21:56 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "19" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"value\": []\r\n}", - "isContentBase64": false - } - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/test/Remove-AzGalleryApplication.Tests.ps1 b/src/Compute/Compute.Autorest/test/Remove-AzGalleryApplication.Tests.ps1 index 2ab67da07425..165af8d07572 100644 --- a/src/Compute/Compute.Autorest/test/Remove-AzGalleryApplication.Tests.ps1 +++ b/src/Compute/Compute.Autorest/test/Remove-AzGalleryApplication.Tests.ps1 @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzGalleryApplication') . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Remove-AzGalleryApplication' { +Describe 'Remove-AzGalleryApplication' -Tag 'LiveOnly'{ BeforeAll { $galleryName = "testgallery" + $env.RandomString $galleryApplicationName1 = "testgalapp1" + $env.RandomString diff --git a/src/Compute/Compute.Autorest/test/Remove-AzGalleryApplicationVersion.Recording.json b/src/Compute/Compute.Autorest/test/Remove-AzGalleryApplicationVersion.Recording.json deleted file mode 100644 index 912abfc5db4b..000000000000 --- a/src/Compute/Compute.Autorest/test/Remove-AzGalleryApplicationVersion.Recording.json +++ /dev/null @@ -1,1666 +0,0 @@ -{ - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2?api-version=2021-07-01+1": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2?api-version=2021-07-01", - "Content": "{\r\n \"location\": \"EastUS\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "87" ] - } - }, - "Response": { - "StatusCode": 201, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/CreateUpdateGalleryApplication3Min;149,Microsoft.Compute/CreateUpdateGalleryApplication30Min;748" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "46ec01cd-f19c-45a3-a9b3-65fde9aa5065" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], - "x-ms-correlation-request-id": [ "6844ad1e-824e-4bb2-ad25-2c2eadda5c84" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T214143Z:6844ad1e-824e-4bb2-ad25-2c2eadda5c84" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:41:42 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "369" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k2\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2?api-version=2021-07-01+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "4cf59143-555b-41c8-86e2-19bbd1f4d0f7" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplication" ], - "FullCommandName": [ "New-AzGalleryApplication_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplication3Min;298,Microsoft.Compute/GetGalleryApplication30Min;1994" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "85c1dec6-799f-4507-8097-ad3b1ae1c100" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11970" ], - "x-ms-correlation-request-id": [ "0b4e788c-8c50-4914-a9e7-2b7c8ebda510" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T214213Z:0b4e788c-8c50-4914-a9e7-2b7c8ebda510" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:42:13 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "369" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k2\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.1.0?api-version=2021-07-01+3": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.1.0?api-version=2021-07-01", - "Content": "{\r\n \"location\": \"EastUS\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k2.blob.core.windows.net/container6adgv70k2/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \\u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n }\r\n }\r\n }\r\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "415" ] - } - }, - "Response": { - "StatusCode": 201, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/36752f06-022c-4c9e-a45b-756307eafc7a?api-version=2021-07-01" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/CreateUpdateGalleryApplicationVersion3Min;149,Microsoft.Compute/CreateUpdateGalleryApplicationVersion30Min;747" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "36752f06-022c-4c9e-a45b-756307eafc7a" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], - "x-ms-correlation-request-id": [ "a5dba552-8f43-4ac1-ab0f-e51f199415e0" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T214239Z:a5dba552-8f43-4ac1-ab0f-e51f199415e0" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:42:39 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1111" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"0.1.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.1.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k2.blob.core.windows.net/container6adgv70k2/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-31T21:42:39.7056901+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/36752f06-022c-4c9e-a45b-756307eafc7a?api-version=2021-07-01+4": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/36752f06-022c-4c9e-a45b-756307eafc7a?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "f1550b72-1bfc-4808-a9b9-07269a32818d" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1196,Microsoft.Compute/GetOperationStatus30Min;4122" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "367945f8-aad3-46a0-ad02-12a0d465b13d" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11969" ], - "x-ms-correlation-request-id": [ "6b419802-9a1f-4d60-b761-fc7b31f7d57a" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T214310Z:6b419802-9a1f-4d60-b761-fc7b31f7d57a" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:43:09 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:42:39.7056901+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"36752f06-022c-4c9e-a45b-756307eafc7a\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/36752f06-022c-4c9e-a45b-756307eafc7a?api-version=2021-07-01+5": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/36752f06-022c-4c9e-a45b-756307eafc7a?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "6" ], - "x-ms-client-request-id": [ "f1550b72-1bfc-4808-a9b9-07269a32818d" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1193,Microsoft.Compute/GetOperationStatus30Min;4119" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "49a7a631-412d-4376-9896-18609e3a568f" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11968" ], - "x-ms-correlation-request-id": [ "faf916f8-4340-4b0e-9daa-15111d2dba05" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T214340Z:faf916f8-4340-4b0e-9daa-15111d2dba05" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:43:40 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:42:39.7056901+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"36752f06-022c-4c9e-a45b-756307eafc7a\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/36752f06-022c-4c9e-a45b-756307eafc7a?api-version=2021-07-01+6": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/36752f06-022c-4c9e-a45b-756307eafc7a?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "7" ], - "x-ms-client-request-id": [ "f1550b72-1bfc-4808-a9b9-07269a32818d" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1191,Microsoft.Compute/GetOperationStatus30Min;4116" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "0e937018-2213-4497-b64a-6c6e2c2f47ce" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11967" ], - "x-ms-correlation-request-id": [ "4fe8ea5b-3ea5-47a6-938f-8c24c84d475d" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T214410Z:4fe8ea5b-3ea5-47a6-938f-8c24c84d475d" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:44:09 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:42:39.7056901+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"36752f06-022c-4c9e-a45b-756307eafc7a\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/36752f06-022c-4c9e-a45b-756307eafc7a?api-version=2021-07-01+7": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/36752f06-022c-4c9e-a45b-756307eafc7a?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "8" ], - "x-ms-client-request-id": [ "f1550b72-1bfc-4808-a9b9-07269a32818d" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1189,Microsoft.Compute/GetOperationStatus30Min;4113" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "d3f37c10-1cac-411f-a7f0-5da06c977bf1" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11966" ], - "x-ms-correlation-request-id": [ "2d341566-8528-4973-bd12-d7b5b57c2fb5" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T214440Z:2d341566-8528-4973-bd12-d7b5b57c2fb5" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:44:40 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:42:39.7056901+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"36752f06-022c-4c9e-a45b-756307eafc7a\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/36752f06-022c-4c9e-a45b-756307eafc7a?api-version=2021-07-01+8": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/36752f06-022c-4c9e-a45b-756307eafc7a?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "9" ], - "x-ms-client-request-id": [ "f1550b72-1bfc-4808-a9b9-07269a32818d" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1187,Microsoft.Compute/GetOperationStatus30Min;4111" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "a219f55c-a7d1-47c4-b0bf-b5b79cae30e2" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11965" ], - "x-ms-correlation-request-id": [ "4bd63361-f409-4517-b1a2-77ff9d122181" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T214510Z:4bd63361-f409-4517-b1a2-77ff9d122181" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:45:10 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:42:39.7056901+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"36752f06-022c-4c9e-a45b-756307eafc7a\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/36752f06-022c-4c9e-a45b-756307eafc7a?api-version=2021-07-01+9": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/36752f06-022c-4c9e-a45b-756307eafc7a?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "10" ], - "x-ms-client-request-id": [ "f1550b72-1bfc-4808-a9b9-07269a32818d" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1185,Microsoft.Compute/GetOperationStatus30Min;4108" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "b501ef9c-8036-464b-b422-83bf2c647fa7" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11964" ], - "x-ms-correlation-request-id": [ "8679004b-40ea-437c-9334-588226e2755b" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T214541Z:8679004b-40ea-437c-9334-588226e2755b" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:45:40 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:42:39.7056901+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"36752f06-022c-4c9e-a45b-756307eafc7a\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/36752f06-022c-4c9e-a45b-756307eafc7a?api-version=2021-07-01+10": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/36752f06-022c-4c9e-a45b-756307eafc7a?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "11" ], - "x-ms-client-request-id": [ "f1550b72-1bfc-4808-a9b9-07269a32818d" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1185,Microsoft.Compute/GetOperationStatus30Min;4105" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "581a37c6-a371-4670-9f98-41a3e2005721" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11963" ], - "x-ms-correlation-request-id": [ "e1b01af6-520c-411c-b383-edc04383ac5c" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T214611Z:e1b01af6-520c-411c-b383-edc04383ac5c" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:46:10 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:42:39.7056901+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"36752f06-022c-4c9e-a45b-756307eafc7a\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/36752f06-022c-4c9e-a45b-756307eafc7a?api-version=2021-07-01+11": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/36752f06-022c-4c9e-a45b-756307eafc7a?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "12" ], - "x-ms-client-request-id": [ "f1550b72-1bfc-4808-a9b9-07269a32818d" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1184,Microsoft.Compute/GetOperationStatus30Min;4102" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "ad8d20e0-5e0e-41a6-b7e1-c4dd97c104da" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11962" ], - "x-ms-correlation-request-id": [ "711aa144-abf0-4c9d-8f2e-c7ca59e3112b" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T214641Z:711aa144-abf0-4c9d-8f2e-c7ca59e3112b" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:46:41 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:42:39.7056901+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"36752f06-022c-4c9e-a45b-756307eafc7a\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/36752f06-022c-4c9e-a45b-756307eafc7a?api-version=2021-07-01+12": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/36752f06-022c-4c9e-a45b-756307eafc7a?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "13" ], - "x-ms-client-request-id": [ "f1550b72-1bfc-4808-a9b9-07269a32818d" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1184,Microsoft.Compute/GetOperationStatus30Min;4099" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "23c003fc-83c8-4ab3-9580-ac9e74331153" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11961" ], - "x-ms-correlation-request-id": [ "e93312c0-8053-4679-b342-70613b0a245e" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T214711Z:e93312c0-8053-4679-b342-70613b0a245e" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:47:10 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "184" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:42:39.7056901+00:00\",\r\n \"endTime\": \"2021-10-31T21:47:09.8793514+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"name\": \"36752f06-022c-4c9e-a45b-756307eafc7a\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.1.0?api-version=2021-07-01+13": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.1.0?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "14" ], - "x-ms-client-request-id": [ "f1550b72-1bfc-4808-a9b9-07269a32818d" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplicationVersion3Min;1999,Microsoft.Compute/GetGalleryApplicationVersion30Min;9991" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "26fbc426-1afc-4cea-a484-58a54167bfe3" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11960" ], - "x-ms-correlation-request-id": [ "dc4ad67e-c6d6-4f1a-998d-aadabe394518" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T214711Z:dc4ad67e-c6d6-4f1a-998d-aadabe394518" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:47:11 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1112" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"0.1.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.1.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k2.blob.core.windows.net/container6adgv70k2/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-31T21:42:39.7056901+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.2.0?api-version=2021-07-01+14": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.2.0?api-version=2021-07-01", - "Content": "{\r\n \"location\": \"EastUS\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k2.blob.core.windows.net/container6adgv70k2/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \\u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n }\r\n }\r\n }\r\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "415" ] - } - }, - "Response": { - "StatusCode": 201, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/a3bf6d06-64b4-4447-ae40-8a5fa3117434?api-version=2021-07-01" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/CreateUpdateGalleryApplicationVersion3Min;149,Microsoft.Compute/CreateUpdateGalleryApplicationVersion30Min;746" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "a3bf6d06-64b4-4447-ae40-8a5fa3117434" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], - "x-ms-correlation-request-id": [ "80d526cf-733c-46d4-9778-c97072c5882f" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T214712Z:80d526cf-733c-46d4-9778-c97072c5882f" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:47:12 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1111" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"0.2.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.2.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k2.blob.core.windows.net/container6adgv70k2/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-31T21:47:12.5824967+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/a3bf6d06-64b4-4447-ae40-8a5fa3117434?api-version=2021-07-01+15": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/a3bf6d06-64b4-4447-ae40-8a5fa3117434?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "16" ], - "x-ms-client-request-id": [ "a25e5661-4dd9-4526-93ad-281b643d3205" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1184,Microsoft.Compute/GetOperationStatus30Min;4096" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "d907577f-83d2-484b-b75d-e8af7df2188d" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11959" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "8d37ba9e-af52-4d33-b670-4ac518ca9b27" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T214742Z:8d37ba9e-af52-4d33-b670-4ac518ca9b27" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:47:42 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:47:12.5824967+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"a3bf6d06-64b4-4447-ae40-8a5fa3117434\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/a3bf6d06-64b4-4447-ae40-8a5fa3117434?api-version=2021-07-01+16": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/a3bf6d06-64b4-4447-ae40-8a5fa3117434?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "17" ], - "x-ms-client-request-id": [ "a25e5661-4dd9-4526-93ad-281b643d3205" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1183,Microsoft.Compute/GetOperationStatus30Min;4093" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "4fa7491a-8e14-4a0f-9ff8-92252cf4d54f" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11958" ], - "x-ms-correlation-request-id": [ "3c9099e2-9127-497c-9cd2-596a67759bca" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T214813Z:3c9099e2-9127-497c-9cd2-596a67759bca" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:48:12 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:47:12.5824967+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"a3bf6d06-64b4-4447-ae40-8a5fa3117434\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/a3bf6d06-64b4-4447-ae40-8a5fa3117434?api-version=2021-07-01+17": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/a3bf6d06-64b4-4447-ae40-8a5fa3117434?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "18" ], - "x-ms-client-request-id": [ "a25e5661-4dd9-4526-93ad-281b643d3205" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1183,Microsoft.Compute/GetOperationStatus30Min;4090" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "d17c5bb9-8fa6-4d55-b5d1-597e2517802b" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11957" ], - "x-ms-correlation-request-id": [ "116bfa74-a1f0-4026-b0fb-e10aea0bd43a" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T214843Z:116bfa74-a1f0-4026-b0fb-e10aea0bd43a" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:48:43 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:47:12.5824967+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"a3bf6d06-64b4-4447-ae40-8a5fa3117434\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/a3bf6d06-64b4-4447-ae40-8a5fa3117434?api-version=2021-07-01+18": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/a3bf6d06-64b4-4447-ae40-8a5fa3117434?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "19" ], - "x-ms-client-request-id": [ "a25e5661-4dd9-4526-93ad-281b643d3205" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1183,Microsoft.Compute/GetOperationStatus30Min;4087" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "3dfe17ed-8b4b-49c5-b39c-37d03aeaf60c" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11956" ], - "x-ms-correlation-request-id": [ "520c72b1-05cd-4f70-8a11-20d8149c205e" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T214913Z:520c72b1-05cd-4f70-8a11-20d8149c205e" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:49:13 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:47:12.5824967+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"a3bf6d06-64b4-4447-ae40-8a5fa3117434\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/a3bf6d06-64b4-4447-ae40-8a5fa3117434?api-version=2021-07-01+19": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/a3bf6d06-64b4-4447-ae40-8a5fa3117434?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "20" ], - "x-ms-client-request-id": [ "a25e5661-4dd9-4526-93ad-281b643d3205" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1183,Microsoft.Compute/GetOperationStatus30Min;4084" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "15a21501-e8ad-494f-8ea8-12fd431ea795" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11955" ], - "x-ms-correlation-request-id": [ "5df17e09-e313-43a1-99bf-84c5252b93c5" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T214943Z:5df17e09-e313-43a1-99bf-84c5252b93c5" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:49:43 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:47:12.5824967+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"a3bf6d06-64b4-4447-ae40-8a5fa3117434\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/a3bf6d06-64b4-4447-ae40-8a5fa3117434?api-version=2021-07-01+20": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/a3bf6d06-64b4-4447-ae40-8a5fa3117434?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "21" ], - "x-ms-client-request-id": [ "a25e5661-4dd9-4526-93ad-281b643d3205" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1184,Microsoft.Compute/GetOperationStatus30Min;4081" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "90045081-d5c4-48bb-9a65-9ea957a7bd05" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11954" ], - "x-ms-correlation-request-id": [ "a2a087e5-73f8-47b9-81a2-4a916427e034" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215014Z:a2a087e5-73f8-47b9-81a2-4a916427e034" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:50:13 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:47:12.5824967+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"a3bf6d06-64b4-4447-ae40-8a5fa3117434\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/a3bf6d06-64b4-4447-ae40-8a5fa3117434?api-version=2021-07-01+21": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/a3bf6d06-64b4-4447-ae40-8a5fa3117434?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "22" ], - "x-ms-client-request-id": [ "a25e5661-4dd9-4526-93ad-281b643d3205" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1183,Microsoft.Compute/GetOperationStatus30Min;4078" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "53b74c65-4e17-48a5-b331-8659bc5973db" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11953" ], - "x-ms-correlation-request-id": [ "82f838a5-2f3a-4a7c-ac03-ebab1e347732" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215044Z:82f838a5-2f3a-4a7c-ac03-ebab1e347732" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:50:43 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:47:12.5824967+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"a3bf6d06-64b4-4447-ae40-8a5fa3117434\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/a3bf6d06-64b4-4447-ae40-8a5fa3117434?api-version=2021-07-01+22": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/a3bf6d06-64b4-4447-ae40-8a5fa3117434?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "23" ], - "x-ms-client-request-id": [ "a25e5661-4dd9-4526-93ad-281b643d3205" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1184,Microsoft.Compute/GetOperationStatus30Min;4076" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "97e51d7b-3e14-446d-89cb-f08bb0ba14d2" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11952" ], - "x-ms-correlation-request-id": [ "d8cf510c-fa5a-4d94-8cf9-ee7df81a90f9" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215114Z:d8cf510c-fa5a-4d94-8cf9-ee7df81a90f9" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:51:14 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:47:12.5824967+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"a3bf6d06-64b4-4447-ae40-8a5fa3117434\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/a3bf6d06-64b4-4447-ae40-8a5fa3117434?api-version=2021-07-01+23": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/a3bf6d06-64b4-4447-ae40-8a5fa3117434?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "24" ], - "x-ms-client-request-id": [ "a25e5661-4dd9-4526-93ad-281b643d3205" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1184,Microsoft.Compute/GetOperationStatus30Min;4073" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "45261a98-ae9f-4500-9655-a54aa34f1737" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11951" ], - "x-ms-correlation-request-id": [ "154b6498-4160-411f-8cf5-fcdf341e30c2" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215144Z:154b6498-4160-411f-8cf5-fcdf341e30c2" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:51:43 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "184" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:47:12.5824967+00:00\",\r\n \"endTime\": \"2021-10-31T21:51:42.7874445+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"name\": \"a3bf6d06-64b4-4447-ae40-8a5fa3117434\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.2.0?api-version=2021-07-01+24": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.2.0?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "25" ], - "x-ms-client-request-id": [ "a25e5661-4dd9-4526-93ad-281b643d3205" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplicationVersion3Min;1999,Microsoft.Compute/GetGalleryApplicationVersion30Min;9988" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "1c7d7162-51c9-4ec7-8a0f-a95dfa9d5ad4" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11950" ], - "x-ms-correlation-request-id": [ "88b77384-8db3-4721-8310-e2d7d0161904" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215144Z:88b77384-8db3-4721-8310-e2d7d0161904" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:51:44 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1112" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"0.2.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.2.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k2.blob.core.windows.net/container6adgv70k2/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-31T21:47:12.5824967+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions?api-version=2021-07-01+1": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "26" ], - "x-ms-client-request-id": [ "d1aab55d-b8a4-46d7-964f-c7f35ca46f4c" ], - "CommandName": [ "Get-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Get-AzGalleryApplicationVersion_List" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/ListGalleryApplicationVersionsInGalleryApplication3Min;1499,Microsoft.Compute/ListGalleryApplicationVersionsInGalleryApplication30Min;9996" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "2d02358d-1ff9-4569-9904-d22a75f9e33a" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11949" ], - "x-ms-correlation-request-id": [ "38fa56dc-c0eb-46fd-8928-d521a313e261" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215145Z:38fa56dc-c0eb-46fd-8928-d521a313e261" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:51:44 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "2492" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"value\": [\r\n {\r\n \"name\": \"0.1.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.1.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k2.blob.core.windows.net/container6adgv70k2/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-31T21:42:39.7056901+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"name\": \"0.2.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.2.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k2.blob.core.windows.net/container6adgv70k2/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-31T21:47:12.5824967+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.1.0?api-version=2021-07-01+2": { - "Request": { - "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.1.0?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "27" ], - "x-ms-client-request-id": [ "0ddd81ec-57e5-4b56-abc4-f9c188692de7" ], - "CommandName": [ "Remove-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Remove-AzGalleryApplicationVersion_Delete" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 202, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "Location": [ "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/1084d875-e278-4d9b-b467-6f6109754633?monitor=true\u0026api-version=2021-07-01" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/1084d875-e278-4d9b-b467-6f6109754633?api-version=2021-07-01" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/DeleteGalleryApplicationVersion3Min;149,Microsoft.Compute/DeleteGalleryApplicationVersion30Min;995" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "1084d875-e278-4d9b-b467-6f6109754633" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], - "x-ms-correlation-request-id": [ "7de9f290-016b-4ba3-9f3b-c9f8ca0d74ac" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215145Z:7de9f290-016b-4ba3-9f3b-c9f8ca0d74ac" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:51:44 GMT" ] - }, - "ContentHeaders": { - "Expires": [ "-1" ], - "Content-Length": [ "0" ] - }, - "Content": null, - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/1084d875-e278-4d9b-b467-6f6109754633?api-version=2021-07-01+3": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/1084d875-e278-4d9b-b467-6f6109754633?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "28" ], - "x-ms-client-request-id": [ "0ddd81ec-57e5-4b56-abc4-f9c188692de7" ], - "CommandName": [ "Remove-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Remove-AzGalleryApplicationVersion_Delete" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1184,Microsoft.Compute/GetOperationStatus30Min;4070" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "2756b7ea-62cd-4c7d-814b-10bef2b773aa" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11948" ], - "x-ms-correlation-request-id": [ "8af92b5a-9da6-4b7a-83a3-5e48637e08b8" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215215Z:8af92b5a-9da6-4b7a-83a3-5e48637e08b8" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:52:15 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:51:45.4281162+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"1084d875-e278-4d9b-b467-6f6109754633\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/1084d875-e278-4d9b-b467-6f6109754633?api-version=2021-07-01+4": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/1084d875-e278-4d9b-b467-6f6109754633?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "29" ], - "x-ms-client-request-id": [ "0ddd81ec-57e5-4b56-abc4-f9c188692de7" ], - "CommandName": [ "Remove-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Remove-AzGalleryApplicationVersion_Delete" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1184,Microsoft.Compute/GetOperationStatus30Min;4067" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "97ac433b-72fb-42b5-a1fb-db25129e0810" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11947" ], - "x-ms-correlation-request-id": [ "e6ad9bd8-8978-461e-b6ed-82eb797ffd9d" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215245Z:e6ad9bd8-8978-461e-b6ed-82eb797ffd9d" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:52:45 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:51:45.4281162+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"1084d875-e278-4d9b-b467-6f6109754633\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/1084d875-e278-4d9b-b467-6f6109754633?api-version=2021-07-01+5": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/1084d875-e278-4d9b-b467-6f6109754633?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "30" ], - "x-ms-client-request-id": [ "0ddd81ec-57e5-4b56-abc4-f9c188692de7" ], - "CommandName": [ "Remove-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Remove-AzGalleryApplicationVersion_Delete" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1184,Microsoft.Compute/GetOperationStatus30Min;4064" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "67e2352b-08ea-4d73-9dc9-26f53389c9c6" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11946" ], - "x-ms-correlation-request-id": [ "bb41e565-c18a-431d-9d9c-6ffa0f6fc744" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215316Z:bb41e565-c18a-431d-9d9c-6ffa0f6fc744" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:53:15 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "183" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:51:45.4281162+00:00\",\r\n \"endTime\": \"2021-10-31T21:53:15.600568+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"name\": \"1084d875-e278-4d9b-b467-6f6109754633\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/1084d875-e278-4d9b-b467-6f6109754633?monitor=true\u0026api-version=2021-07-01+6": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/1084d875-e278-4d9b-b467-6f6109754633?monitor=true\u0026api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "31" ], - "x-ms-client-request-id": [ "0ddd81ec-57e5-4b56-abc4-f9c188692de7" ], - "CommandName": [ "Remove-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Remove-AzGalleryApplicationVersion_Delete" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1183,Microsoft.Compute/GetOperationStatus30Min;4063" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "4343e3ef-2318-4382-9cb8-8c1bf94acd47" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11945" ], - "x-ms-correlation-request-id": [ "5b762fca-6a6e-49df-8ca3-9979f5c3825a" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215316Z:5b762fca-6a6e-49df-8ca3-9979f5c3825a" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:53:16 GMT" ] - }, - "ContentHeaders": { - "Expires": [ "-1" ], - "Content-Length": [ "0" ] - }, - "Content": null, - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions?api-version=2021-07-01+7": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "32" ], - "x-ms-client-request-id": [ "aa704f9b-6a85-41c3-94ce-eaf91c9fc690" ], - "CommandName": [ "Get-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Get-AzGalleryApplicationVersion_List" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/ListGalleryApplicationVersionsInGalleryApplication3Min;1498,Microsoft.Compute/ListGalleryApplicationVersionsInGalleryApplication30Min;9995" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "957bd732-0b14-4425-91d8-2ad03b3ef759" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11944" ], - "x-ms-correlation-request-id": [ "3cff9af0-cf26-4db1-a190-5f792465a857" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215316Z:3cff9af0-cf26-4db1-a190-5f792465a857" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:53:16 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1257" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"value\": [\r\n {\r\n \"name\": \"0.2.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.2.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k2.blob.core.windows.net/container6adgv70k2/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-31T21:47:12.5824967+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions?api-version=2021-07-01+1": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "33" ], - "x-ms-client-request-id": [ "3d940dce-71c3-41b3-a59f-4b618660b8f9" ], - "CommandName": [ "Get-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Get-AzGalleryApplicationVersion_List" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/ListGalleryApplicationVersionsInGalleryApplication3Min;1497,Microsoft.Compute/ListGalleryApplicationVersionsInGalleryApplication30Min;9994" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "8fc0b8cb-0e32-47f5-9043-a06d22bb42f3" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11943" ], - "x-ms-correlation-request-id": [ "b351ad03-3414-4624-a64f-e1efbfb93d4e" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215316Z:b351ad03-3414-4624-a64f-e1efbfb93d4e" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:53:16 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1257" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"value\": [\r\n {\r\n \"name\": \"0.2.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.2.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k2.blob.core.windows.net/container6adgv70k2/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-31T21:47:12.5824967+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.2.0?api-version=2021-07-01+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.2.0?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "34" ], - "x-ms-client-request-id": [ "74ad621e-50b0-4fa0-82c5-fdd85890380d" ], - "CommandName": [ "Get-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Get-AzGalleryApplicationVersion_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplicationVersion3Min;1997,Microsoft.Compute/GetGalleryApplicationVersion30Min;9986" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "f7f93324-fbb6-4b32-a5c4-4e13155774e4" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11942" ], - "x-ms-correlation-request-id": [ "1cbfe017-11fd-48e9-871e-ad3f16d6a853" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215316Z:1cbfe017-11fd-48e9-871e-ad3f16d6a853" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:53:16 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1112" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"0.2.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.2.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k2.blob.core.windows.net/container6adgv70k2/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-31T21:47:12.5824967+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.2.0?api-version=2021-07-01+3": { - "Request": { - "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions/0.2.0?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "35" ], - "x-ms-client-request-id": [ "e87dc2de-7081-4ecf-a518-8782de053a5b" ], - "CommandName": [ "Remove-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Remove-AzGalleryApplicationVersion_DeleteViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 202, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "Location": [ "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/d072cb4f-dd62-4cce-bccd-df6a1c81f1f7?monitor=true\u0026api-version=2021-07-01" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/d072cb4f-dd62-4cce-bccd-df6a1c81f1f7?api-version=2021-07-01" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/DeleteGalleryApplicationVersion3Min;148,Microsoft.Compute/DeleteGalleryApplicationVersion30Min;994" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "d072cb4f-dd62-4cce-bccd-df6a1c81f1f7" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14997" ], - "x-ms-correlation-request-id": [ "1a00406c-55dd-4e7d-b638-46021e7e3336" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215317Z:1a00406c-55dd-4e7d-b638-46021e7e3336" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:53:17 GMT" ] - }, - "ContentHeaders": { - "Expires": [ "-1" ], - "Content-Length": [ "0" ] - }, - "Content": null, - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/d072cb4f-dd62-4cce-bccd-df6a1c81f1f7?api-version=2021-07-01+4": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/d072cb4f-dd62-4cce-bccd-df6a1c81f1f7?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "36" ], - "x-ms-client-request-id": [ "e87dc2de-7081-4ecf-a518-8782de053a5b" ], - "CommandName": [ "Remove-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Remove-AzGalleryApplicationVersion_DeleteViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1182,Microsoft.Compute/GetOperationStatus30Min;4060" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "1817a3c0-3542-4b4b-8d02-92021b4ffc32" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11941" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "ca522542-38c1-4d38-b8e8-64cd8f159316" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215347Z:ca522542-38c1-4d38-b8e8-64cd8f159316" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:53:46 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:53:17.2099558+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"d072cb4f-dd62-4cce-bccd-df6a1c81f1f7\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/d072cb4f-dd62-4cce-bccd-df6a1c81f1f7?api-version=2021-07-01+5": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/d072cb4f-dd62-4cce-bccd-df6a1c81f1f7?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "37" ], - "x-ms-client-request-id": [ "e87dc2de-7081-4ecf-a518-8782de053a5b" ], - "CommandName": [ "Remove-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Remove-AzGalleryApplicationVersion_DeleteViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1182,Microsoft.Compute/GetOperationStatus30Min;4057" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "3d34e27a-9874-44a6-9bdb-7ffe148d970e" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11940" ], - "x-ms-correlation-request-id": [ "5079d495-584e-4403-9420-6cc90a7546e7" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215417Z:5079d495-584e-4403-9420-6cc90a7546e7" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:54:17 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:53:17.2099558+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"d072cb4f-dd62-4cce-bccd-df6a1c81f1f7\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/d072cb4f-dd62-4cce-bccd-df6a1c81f1f7?api-version=2021-07-01+6": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/d072cb4f-dd62-4cce-bccd-df6a1c81f1f7?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "38" ], - "x-ms-client-request-id": [ "e87dc2de-7081-4ecf-a518-8782de053a5b" ], - "CommandName": [ "Remove-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Remove-AzGalleryApplicationVersion_DeleteViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1182,Microsoft.Compute/GetOperationStatus30Min;4054" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "26f6721b-1b46-433f-b726-5af7d2cd8c5c" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11936" ], - "x-ms-correlation-request-id": [ "85393acf-6bde-4ae8-8633-c150b070c467" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215448Z:85393acf-6bde-4ae8-8633-c150b070c467" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:54:47 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "184" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T21:53:17.2099558+00:00\",\r\n \"endTime\": \"2021-10-31T21:54:47.3671058+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"name\": \"d072cb4f-dd62-4cce-bccd-df6a1c81f1f7\"\r\n}", - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/d072cb4f-dd62-4cce-bccd-df6a1c81f1f7?monitor=true\u0026api-version=2021-07-01+7": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/d072cb4f-dd62-4cce-bccd-df6a1c81f1f7?monitor=true\u0026api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "39" ], - "x-ms-client-request-id": [ "e87dc2de-7081-4ecf-a518-8782de053a5b" ], - "CommandName": [ "Remove-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Remove-AzGalleryApplicationVersion_DeleteViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1181,Microsoft.Compute/GetOperationStatus30Min;4053" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "a253e573-3bae-474d-839b-df334ce0ffc2" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11935" ], - "x-ms-correlation-request-id": [ "5b746899-4d35-4ddb-8742-6e1ffd1b1835" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215448Z:5b746899-4d35-4ddb-8742-6e1ffd1b1835" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:54:47 GMT" ] - }, - "ContentHeaders": { - "Expires": [ "-1" ], - "Content-Length": [ "0" ] - }, - "Content": null, - "isContentBase64": false - } - }, - "Remove-AzGalleryApplicationVersion+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions?api-version=2021-07-01+8": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k2/applications/testgalapp6adgv70k2/versions?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "40" ], - "x-ms-client-request-id": [ "83095c10-4060-428c-8661-1a65030636b5" ], - "CommandName": [ "Get-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Get-AzGalleryApplicationVersion_List" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/ListGalleryApplicationVersionsInGalleryApplication3Min;1497,Microsoft.Compute/ListGalleryApplicationVersionsInGalleryApplication30Min;9993" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "183a7d8d-cd73-4118-8295-be2e68a5741a" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11934" ], - "x-ms-correlation-request-id": [ "b6ab1663-0646-47cd-b0bf-d71a8ccafbae" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T215448Z:b6ab1663-0646-47cd-b0bf-d71a8ccafbae" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 21:54:47 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "19" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"value\": []\r\n}", - "isContentBase64": false - } - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/test/Remove-AzGalleryApplicationVersion.Tests.ps1 b/src/Compute/Compute.Autorest/test/Remove-AzGalleryApplicationVersion.Tests.ps1 index b34e49fd8d99..14c83fc7182c 100644 --- a/src/Compute/Compute.Autorest/test/Remove-AzGalleryApplicationVersion.Tests.ps1 +++ b/src/Compute/Compute.Autorest/test/Remove-AzGalleryApplicationVersion.Tests.ps1 @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzGalleryApplicationVe . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Remove-AzGalleryApplicationVersion' { +Describe 'Remove-AzGalleryApplicationVersion' -Tag 'LiveOnly'{ BeforeAll { $env.RandomString = $env.RandomString + "2" $galleryName = "testgallery" + $env.RandomString diff --git a/src/Compute/Compute.Autorest/test/Update-AzGalleryApplication.Recording.json b/src/Compute/Compute.Autorest/test/Update-AzGalleryApplication.Recording.json deleted file mode 100644 index 352b9dfbfe36..000000000000 --- a/src/Compute/Compute.Autorest/test/Update-AzGalleryApplication.Recording.json +++ /dev/null @@ -1,288 +0,0 @@ -{ - "Update-AzGalleryApplication+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01+1": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01", - "Content": "{\r\n \"location\": \"EastUS\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "87" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/CreateUpdateGalleryApplication3Min;145,Microsoft.Compute/CreateUpdateGalleryApplication30Min;744" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132701620474740484,70d5434e-5504-4968-b956-f8d027c07083_132701620474740484" ], - "x-ms-request-id": [ "12c054ac-eb64-49ea-b7b6-6e8ed1f5fd28" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], - "x-ms-correlation-request-id": [ "4864a79c-b7a8-4c74-baf6-95a6a6a86916" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211027T180246Z:4864a79c-b7a8-4c74-baf6-95a6a6a86916" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Wed, 27 Oct 2021 18:02:46 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "366" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplication+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "21" ], - "x-ms-client-request-id": [ "2f136ead-92c3-4245-b0f3-5f9e1c7e3445" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplication" ], - "FullCommandName": [ "New-AzGalleryApplication_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplication3Min;281,Microsoft.Compute/GetGalleryApplication30Min;1974" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132701620474740484,70d5434e-5504-4968-b956-f8d027c07083_132701620474740484" ], - "x-ms-request-id": [ "1118806a-9211-4b8c-9f7d-2c2ae4e8ea36" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11975" ], - "x-ms-correlation-request-id": [ "911d61b1-c4a8-4c64-ac2d-f6ed855e3c8b" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211027T180317Z:911d61b1-c4a8-4c64-ac2d-f6ed855e3c8b" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Wed, 27 Oct 2021 18:03:16 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "366" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplication+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01+1": { - "Request": { - "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01", - "Content": "{\r\n \"properties\": {\r\n \"description\": \"testDescription\"\r\n }\r\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "66" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/CreateUpdateGalleryApplication3Min;144,Microsoft.Compute/CreateUpdateGalleryApplication30Min;743" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132701620474740484,70d5434e-5504-4968-b956-f8d027c07083_132701620474740484" ], - "x-ms-request-id": [ "bfd576a6-ad39-419c-b7b4-29b43e4bfd03" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1192" ], - "x-ms-correlation-request-id": [ "df3932e4-f2a2-4cc0-bb7d-863c13dd9ad4" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211027T180317Z:df3932e4-f2a2-4cc0-bb7d-863c13dd9ad4" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Wed, 27 Oct 2021 18:03:17 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "405" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\",\r\n \"description\": \"testDescription\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplication+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "23" ], - "x-ms-client-request-id": [ "db95b686-4dd8-45ef-9806-3d0ae7126334" ], - "CommandName": [ "Get-AzGalleryApplication" ], - "FullCommandName": [ "Get-AzGalleryApplication_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplication3Min;279,Microsoft.Compute/GetGalleryApplication30Min;1972" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132701620474740484,70d5434e-5504-4968-b956-f8d027c07083_132701620474740484" ], - "x-ms-request-id": [ "4079a30c-b2da-4457-8d55-396d373e6114" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11974" ], - "x-ms-correlation-request-id": [ "3e3a0c8e-cc30-4afb-b6b0-366c21e30bda" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211027T180318Z:3e3a0c8e-cc30-4afb-b6b0-366c21e30bda" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Wed, 27 Oct 2021 18:03:17 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "405" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\",\r\n \"description\": \"testDescription\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplication+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01+1": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "24" ], - "x-ms-client-request-id": [ "479fdc7a-9a92-4b08-b347-64c712e1742a" ], - "CommandName": [ "Get-AzGalleryApplication" ], - "FullCommandName": [ "Get-AzGalleryApplication_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplication3Min;277,Microsoft.Compute/GetGalleryApplication30Min;1970" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132701620474740484,70d5434e-5504-4968-b956-f8d027c07083_132701620474740484" ], - "x-ms-request-id": [ "949dc755-e9c6-4685-80dc-f2b00ec0e6a8" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11973" ], - "x-ms-correlation-request-id": [ "ab5983f2-858d-48c6-b7d5-0a705d47be82" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211027T180318Z:ab5983f2-858d-48c6-b7d5-0a705d47be82" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Wed, 27 Oct 2021 18:03:17 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "405" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\",\r\n \"description\": \"testDescription\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplication+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01+2": { - "Request": { - "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01", - "Content": "{\r\n \"properties\": {\r\n \"description\": \"testDescriptionNEW\"\r\n }\r\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "69" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/CreateUpdateGalleryApplication3Min;143,Microsoft.Compute/CreateUpdateGalleryApplication30Min;742" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132701620474740484,70d5434e-5504-4968-b956-f8d027c07083_132701620474740484" ], - "x-ms-request-id": [ "d5878b90-e7ec-4a3e-95b3-cda04e0b4b2b" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1191" ], - "x-ms-correlation-request-id": [ "f4add0d4-9a25-418f-98ae-a38359a49205" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211027T180318Z:f4add0d4-9a25-418f-98ae-a38359a49205" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Wed, 27 Oct 2021 18:03:18 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "408" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\",\r\n \"description\": \"testDescriptionNEW\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplication+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01+3": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "26" ], - "x-ms-client-request-id": [ "6f116538-5b21-4653-9a6d-ceeef268dc15" ], - "CommandName": [ "Get-AzGalleryApplication" ], - "FullCommandName": [ "Get-AzGalleryApplication_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplication3Min;276,Microsoft.Compute/GetGalleryApplication30Min;1969" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132701620474740484,70d5434e-5504-4968-b956-f8d027c07083_132701620474740484" ], - "x-ms-request-id": [ "8a64c692-513c-46af-8d60-500afeea1a7c" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11972" ], - "x-ms-correlation-request-id": [ "2dda98c3-5a1f-4a4d-9bc1-ded4043a2e60" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211027T180318Z:2dda98c3-5a1f-4a4d-9bc1-ded4043a2e60" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Wed, 27 Oct 2021 18:03:18 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "408" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k/applications/testgalapp6adgv70k\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\",\r\n \"description\": \"testDescriptionNEW\"\r\n }\r\n}", - "isContentBase64": false - } - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/test/Update-AzGalleryApplication.Tests.ps1 b/src/Compute/Compute.Autorest/test/Update-AzGalleryApplication.Tests.ps1 index 0d7c2e718d12..a00e72e64888 100644 --- a/src/Compute/Compute.Autorest/test/Update-AzGalleryApplication.Tests.ps1 +++ b/src/Compute/Compute.Autorest/test/Update-AzGalleryApplication.Tests.ps1 @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Update-AzGalleryApplication') . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Update-AzGalleryApplication' { +Describe 'Update-AzGalleryApplication' -Tag 'LiveOnly'{ BeforeAll { $galleryName = "testgallery" + $env.RandomString $galleryApplicationName = "testgalapp" + $env.RandomString diff --git a/src/Compute/Compute.Autorest/test/Update-AzGalleryApplicationVersion.Recording.json b/src/Compute/Compute.Autorest/test/Update-AzGalleryApplicationVersion.Recording.json deleted file mode 100644 index 7c153ec7d8e0..000000000000 --- a/src/Compute/Compute.Autorest/test/Update-AzGalleryApplicationVersion.Recording.json +++ /dev/null @@ -1,759 +0,0 @@ -{ - "Update-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3?api-version=2021-07-01+1": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3?api-version=2021-07-01", - "Content": "{\r\n \"location\": \"EastUS\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "87" ] - } - }, - "Response": { - "StatusCode": 201, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/CreateUpdateGalleryApplication3Min;149,Microsoft.Compute/CreateUpdateGalleryApplication30Min;748" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "078f9eb1-28e7-4bb7-9ef8-970f5e2474bf" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "6edc5038-281a-48de-aec6-8b8150435c75" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T223933Z:6edc5038-281a-48de-aec6-8b8150435c75" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 22:39:32 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "369" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k3\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3?api-version=2021-07-01+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "0e8dd901-8283-4aa1-afe4-8e84d900abf1" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplication" ], - "FullCommandName": [ "New-AzGalleryApplication_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplication3Min;299,Microsoft.Compute/GetGalleryApplication30Min;1998" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "4c9000db-b704-49a7-ada4-2a9d5c573593" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11909" ], - "x-ms-correlation-request-id": [ "812fb78f-f53e-4392-9136-b33bd6f68726" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T224003Z:812fb78f-f53e-4392-9136-b33bd6f68726" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 22:40:02 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "369" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"testgalapp6adgv70k3\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3\",\r\n \"type\": \"Microsoft.Compute/galleries/applications\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"supportedOSType\": \"Windows\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0?api-version=2021-07-01+3": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0?api-version=2021-07-01", - "Content": "{\r\n \"location\": \"EastUS\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k3.blob.core.windows.net/container6adgv70k3/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \\u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n }\r\n }\r\n }\r\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "415" ] - } - }, - "Response": { - "StatusCode": 201, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/e705554e-788a-4ac0-ba96-69e821fd49fc?api-version=2021-07-01" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/CreateUpdateGalleryApplicationVersion3Min;149,Microsoft.Compute/CreateUpdateGalleryApplicationVersion30Min;749" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "e705554e-788a-4ac0-ba96-69e821fd49fc" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-correlation-request-id": [ "fc522a4e-c0a6-411f-adb0-e72c59826a43" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T224030Z:fc522a4e-c0a6-411f-adb0-e72c59826a43" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 22:40:30 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1111" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"0.1.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k3.blob.core.windows.net/container6adgv70k3/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-31T22:40:30.8236506+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/e705554e-788a-4ac0-ba96-69e821fd49fc?api-version=2021-07-01+4": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/e705554e-788a-4ac0-ba96-69e821fd49fc?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "e0e57183-3327-406b-b458-1472fed1e8f9" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1196,Microsoft.Compute/GetOperationStatus30Min;4191" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "4bd8b18f-f2b9-4fe6-99fb-932e2ce45333" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11908" ], - "x-ms-correlation-request-id": [ "03cf1ee2-eb05-49cd-85ad-edf5c31d696c" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T224101Z:03cf1ee2-eb05-49cd-85ad-edf5c31d696c" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 22:41:01 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T22:40:30.8236506+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"e705554e-788a-4ac0-ba96-69e821fd49fc\"\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/e705554e-788a-4ac0-ba96-69e821fd49fc?api-version=2021-07-01+5": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/e705554e-788a-4ac0-ba96-69e821fd49fc?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "6" ], - "x-ms-client-request-id": [ "e0e57183-3327-406b-b458-1472fed1e8f9" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1193,Microsoft.Compute/GetOperationStatus30Min;4188" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "c139c9db-65d3-43ba-beab-3d4a4a4f7fe4" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11907" ], - "x-ms-correlation-request-id": [ "cf7f4b9f-f554-4f15-b06e-f56f2a77b038" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T224131Z:cf7f4b9f-f554-4f15-b06e-f56f2a77b038" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 22:41:30 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T22:40:30.8236506+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"e705554e-788a-4ac0-ba96-69e821fd49fc\"\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/e705554e-788a-4ac0-ba96-69e821fd49fc?api-version=2021-07-01+6": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/e705554e-788a-4ac0-ba96-69e821fd49fc?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "7" ], - "x-ms-client-request-id": [ "e0e57183-3327-406b-b458-1472fed1e8f9" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1191,Microsoft.Compute/GetOperationStatus30Min;4185" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "966e7a73-7d84-4147-b7c1-a9b6f1daa006" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11906" ], - "x-ms-correlation-request-id": [ "489aea8b-0c8b-4e5d-a546-02930ef83c55" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T224201Z:489aea8b-0c8b-4e5d-a546-02930ef83c55" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 22:42:01 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T22:40:30.8236506+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"e705554e-788a-4ac0-ba96-69e821fd49fc\"\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/e705554e-788a-4ac0-ba96-69e821fd49fc?api-version=2021-07-01+7": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/e705554e-788a-4ac0-ba96-69e821fd49fc?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "8" ], - "x-ms-client-request-id": [ "e0e57183-3327-406b-b458-1472fed1e8f9" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1189,Microsoft.Compute/GetOperationStatus30Min;4182" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "41331d8b-a3a3-47cf-b010-e22e4769f247" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11905" ], - "x-ms-correlation-request-id": [ "6670b157-74da-4a6a-9e76-b9f547dca3ae" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T224231Z:6670b157-74da-4a6a-9e76-b9f547dca3ae" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 22:42:31 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T22:40:30.8236506+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"e705554e-788a-4ac0-ba96-69e821fd49fc\"\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/e705554e-788a-4ac0-ba96-69e821fd49fc?api-version=2021-07-01+8": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/e705554e-788a-4ac0-ba96-69e821fd49fc?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "9" ], - "x-ms-client-request-id": [ "e0e57183-3327-406b-b458-1472fed1e8f9" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1186,Microsoft.Compute/GetOperationStatus30Min;4179" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "61dec612-7a51-41a2-8fa3-ccea9019dd94" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11904" ], - "x-ms-correlation-request-id": [ "b313d166-89bc-45ac-be50-29f1d7c31073" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T224301Z:b313d166-89bc-45ac-be50-29f1d7c31073" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 22:43:01 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T22:40:30.8236506+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"e705554e-788a-4ac0-ba96-69e821fd49fc\"\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/e705554e-788a-4ac0-ba96-69e821fd49fc?api-version=2021-07-01+9": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/e705554e-788a-4ac0-ba96-69e821fd49fc?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "10" ], - "x-ms-client-request-id": [ "e0e57183-3327-406b-b458-1472fed1e8f9" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1184,Microsoft.Compute/GetOperationStatus30Min;4176" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "f2ca3658-7566-4c1f-92ca-698ce7d669c5" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11903" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "e62b1cdf-c78f-49ac-a6dc-676699126a3b" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T224332Z:e62b1cdf-c78f-49ac-a6dc-676699126a3b" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 22:43:31 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T22:40:30.8236506+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"e705554e-788a-4ac0-ba96-69e821fd49fc\"\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/e705554e-788a-4ac0-ba96-69e821fd49fc?api-version=2021-07-01+10": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/e705554e-788a-4ac0-ba96-69e821fd49fc?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "11" ], - "x-ms-client-request-id": [ "e0e57183-3327-406b-b458-1472fed1e8f9" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1185,Microsoft.Compute/GetOperationStatus30Min;4174" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "bbcc1bef-78c7-4f56-a7a1-e527d9f729e6" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11902" ], - "x-ms-correlation-request-id": [ "6d2fed30-3630-4cae-b9d7-7ff70cab5198" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T224402Z:6d2fed30-3630-4cae-b9d7-7ff70cab5198" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 22:44:02 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T22:40:30.8236506+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"e705554e-788a-4ac0-ba96-69e821fd49fc\"\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/e705554e-788a-4ac0-ba96-69e821fd49fc?api-version=2021-07-01+11": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/e705554e-788a-4ac0-ba96-69e821fd49fc?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "12" ], - "x-ms-client-request-id": [ "e0e57183-3327-406b-b458-1472fed1e8f9" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1185,Microsoft.Compute/GetOperationStatus30Min;4171" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "cabad339-4f70-4605-8fa5-bfdade2cf88f" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11901" ], - "x-ms-correlation-request-id": [ "43a97301-9d5f-4590-a5f4-e8a40e982901" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T224432Z:43a97301-9d5f-4590-a5f4-e8a40e982901" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 22:44:32 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "134" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T22:40:30.8236506+00:00\",\r\n \"status\": \"InProgress\",\r\n \"name\": \"e705554e-788a-4ac0-ba96-69e821fd49fc\"\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/e705554e-788a-4ac0-ba96-69e821fd49fc?api-version=2021-07-01+12": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/e705554e-788a-4ac0-ba96-69e821fd49fc?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "13" ], - "x-ms-client-request-id": [ "e0e57183-3327-406b-b458-1472fed1e8f9" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetOperationStatus3Min;1185,Microsoft.Compute/GetOperationStatus30Min;4173" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "001adf7b-b3de-4576-9814-6bab93f6edce" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11900" ], - "x-ms-correlation-request-id": [ "1f1b7104-47f0-4095-8797-a0d539b96588" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T224503Z:1f1b7104-47f0-4095-8797-a0d539b96588" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 22:45:02 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "184" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"startTime\": \"2021-10-31T22:40:30.8236506+00:00\",\r\n \"endTime\": \"2021-10-31T22:45:00.9660819+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"name\": \"e705554e-788a-4ac0-ba96-69e821fd49fc\"\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplicationVersion+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0?api-version=2021-07-01+13": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "14" ], - "x-ms-client-request-id": [ "e0e57183-3327-406b-b458-1472fed1e8f9" ], - "CommandName": [ "Az.Compute.internal\\New-AzGalleryApplicationVersion" ], - "FullCommandName": [ "New-AzGalleryApplicationVersion_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplicationVersion3Min;1999,Microsoft.Compute/GetGalleryApplicationVersion30Min;9998" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "4a8f4191-9995-4398-be90-b58c3f9bae9d" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11899" ], - "x-ms-correlation-request-id": [ "bfe82ba1-1e29-4b14-a52b-89f896603bad" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T224503Z:bfe82ba1-1e29-4b14-a52b-89f896603bad" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 22:45:03 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1112" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"0.1.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k3.blob.core.windows.net/container6adgv70k3/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-31T22:40:30.8236506+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplicationVersion+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0?api-version=2021-07-01+1": { - "Request": { - "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0?api-version=2021-07-01", - "Content": "{\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"replicaCount\": 3,\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k3.blob.core.windows.net/container6adgv70k3/testfile.txt\"\r\n }\r\n }\r\n }\r\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "220" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/23075bf5-6bf0-4086-a726-c83c533b70ca?api-version=2021-07-01" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/CreateUpdateGalleryApplicationVersion3Min;149,Microsoft.Compute/CreateUpdateGalleryApplicationVersion30Min;748" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "23075bf5-6bf0-4086-a726-c83c533b70ca" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], - "x-ms-correlation-request-id": [ "26b97448-3326-41b2-a799-d5679cd42f43" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T224503Z:26b97448-3326-41b2-a799-d5679cd42f43" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 22:45:03 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1111" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"0.1.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k3.blob.core.windows.net/container6adgv70k3/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 3,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-31T22:40:30.8236506+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Updating\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplicationVersion+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0?api-version=2021-07-01+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "16" ], - "x-ms-client-request-id": [ "bdb1c72a-1a6c-472a-aac3-826efe23f900" ], - "CommandName": [ "Get-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Get-AzGalleryApplicationVersion_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplicationVersion3Min;1998,Microsoft.Compute/GetGalleryApplicationVersion30Min;9997" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "5ee04477-5eb3-40bd-ba3f-8a20e47f0edc" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11898" ], - "x-ms-correlation-request-id": [ "16a093fd-5082-4103-9af9-5e76678e3368" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T224503Z:16a093fd-5082-4103-9af9-5e76678e3368" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 22:45:03 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1111" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"0.1.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k3.blob.core.windows.net/container6adgv70k3/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 3,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-31T22:40:30.8236506+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Updating\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplicationVersion+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0?api-version=2021-07-01+1": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "17" ], - "x-ms-client-request-id": [ "cc9bea7e-2ddf-4843-90f8-c39e8718b2b1" ], - "CommandName": [ "Get-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Get-AzGalleryApplicationVersion_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplicationVersion3Min;1997,Microsoft.Compute/GetGalleryApplicationVersion30Min;9996" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "06891eb6-7485-44b8-a400-ece0b0d24e48" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11897" ], - "x-ms-correlation-request-id": [ "65f1c792-a067-4e67-a34a-7cab45020e8a" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T224504Z:65f1c792-a067-4e67-a34a-7cab45020e8a" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 22:45:03 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1111" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"0.1.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k3.blob.core.windows.net/container6adgv70k3/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 3,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-31T22:40:30.8236506+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Updating\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplicationVersion+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0?api-version=2021-07-01+2": { - "Request": { - "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0?api-version=2021-07-01", - "Content": "{\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"replicaCount\": 4,\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k3.blob.core.windows.net/container6adgv70k3/testfile.txt\"\r\n }\r\n }\r\n }\r\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "220" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/providers/Microsoft.Compute/locations/eastus/capsOperations/d7d680f1-ad1d-4153-b515-507416daf0e0?api-version=2021-07-01" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/CreateUpdateGalleryApplicationVersion3Min;148,Microsoft.Compute/CreateUpdateGalleryApplicationVersion30Min;747" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "d7d680f1-ad1d-4153-b515-507416daf0e0" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], - "x-ms-correlation-request-id": [ "cbaf3997-6ce6-461a-9438-96202cec5ff9" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T224504Z:cbaf3997-6ce6-461a-9438-96202cec5ff9" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 22:45:04 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1111" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"0.1.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k3.blob.core.windows.net/container6adgv70k3/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 4,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-31T22:40:30.8236506+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Updating\"\r\n }\r\n}", - "isContentBase64": false - } - }, - "Update-AzGalleryApplicationVersion+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0?api-version=2021-07-01+3": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0?api-version=2021-07-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "19" ], - "x-ms-client-request-id": [ "e4ba1909-0956-43de-a3a2-831e53064e6e" ], - "CommandName": [ "Get-AzGalleryApplicationVersion" ], - "FullCommandName": [ "Get-AzGalleryApplicationVersion_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v6.5.0", "PSVersion/v7.1.5" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-resource": [ "Microsoft.Compute/GetGalleryApplicationVersion3Min;1996,Microsoft.Compute/GetGalleryApplicationVersion30Min;9995" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-served-by": [ "70d5434e-5504-4968-b956-f8d027c07083_132736855405793073,70d5434e-5504-4968-b956-f8d027c07083_132736855405793073" ], - "x-ms-request-id": [ "c68ef0cd-b290-4905-8df2-903c6fcd9d46" ], - "Server": [ "Microsoft-HTTPAPI/2.0", "Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11896" ], - "x-ms-correlation-request-id": [ "b96483d9-eb72-49ec-a499-9519e4ac9c09" ], - "x-ms-routing-request-id": [ "FRANCECENTRAL:20211031T224504Z:b96483d9-eb72-49ec-a499-9519e4ac9c09" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 31 Oct 2021 22:45:04 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1111" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\r\n \"name\": \"0.1.0\",\r\n \"id\": \"/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGComputeTest6adgv70k/providers/Microsoft.Compute/galleries/testgallery6adgv70k3/applications/testgalapp6adgv70k3/versions/0.1.0\",\r\n \"type\": \"Microsoft.Compute/galleries/applications/versions\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"publishingProfile\": {\r\n \"source\": {\r\n \"mediaLink\": \"https://storacc6adgv70k3.blob.core.windows.net/container6adgv70k3/testfile.txt\"\r\n },\r\n \"manageActions\": {\r\n \"install\": \"powershell -command \u0027Expand-Archive -Path package.zip -DestinationPath C:\\\\\\\\package\\\\\u0027\",\r\n \"remove\": \"del C:\\\\\\\\package\"\r\n },\r\n \"enableHealthCheck\": false,\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 4,\r\n \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-10-31T22:40:30.8236506+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"provisioningState\": \"Updating\"\r\n }\r\n}", - "isContentBase64": false - } - } -} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/test/Update-AzGalleryApplicationVersion.Tests.ps1 b/src/Compute/Compute.Autorest/test/Update-AzGalleryApplicationVersion.Tests.ps1 index 25868942530b..a291b320e841 100644 --- a/src/Compute/Compute.Autorest/test/Update-AzGalleryApplicationVersion.Tests.ps1 +++ b/src/Compute/Compute.Autorest/test/Update-AzGalleryApplicationVersion.Tests.ps1 @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Update-AzGalleryApplicationVe . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Update-AzGalleryApplicationVersion' { +Describe 'Update-AzGalleryApplicationVersion' -Tag 'LiveOnly'{ BeforeAll { $env.RandomString = $env.RandomString + "3" $galleryName = "testgallery" + $env.RandomString diff --git a/src/Compute/Compute.Autorest/test/env.json b/src/Compute/Compute.Autorest/test/env.json index e16b7dd3ccf3..ac0b8ef8128e 100644 --- a/src/Compute/Compute.Autorest/test/env.json +++ b/src/Compute/Compute.Autorest/test/env.json @@ -1,9 +1,8 @@ { - "vmname": "testpwshellvm", - "vmssname": "testpwshellvmss", - "RandomString": "6adgv70k", - "SubscriptionId": "e37510d7-33b6-4676-886f-ee75bcc01871", - "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "Location": "EastUS", - "ResourceGroupName": "RGComputeTest6adgv70k" - } \ No newline at end of file + "SubscriptionId": "e37510d7-33b6-4676-886f-ee75bcc01871", + "Location": "EastUS", + "rgname": "testpwshellcompute", + "ResourceGroupName": "RGComputeTestnfr5c0pt", + "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "RandomString": "nfr5c0pt" +} diff --git a/src/Compute/Compute/Az.Compute.psd1 b/src/Compute/Compute/Az.Compute.psd1 index 8b48b85b3e5a..b85b1ad0b9a5 100644 --- a/src/Compute/Compute/Az.Compute.psd1 +++ b/src/Compute/Compute/Az.Compute.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 6/30/2022 +# Generated on: 7/5/2022 # @{ @@ -196,7 +196,7 @@ CmdletsToExport = 'Remove-AzAvailabilitySet', 'Get-AzAvailabilitySet', 'Add-AzVmssRunCommand', 'Remove-AzVmssRunCommand' # Variables to export from this module -# VariablesToExport = @() +VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = 'Get-AzVmssDiskEncryptionStatus', @@ -218,7 +218,7 @@ PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','Compute','IAAS','VM','VirtualMachine' + Tags = 'Azure', 'ResourceManager', 'ARM', 'Compute', 'IAAS', 'VM', 'VirtualMachine' # A URL to the license for this module. LicenseUri = 'https://aka.ms/azps-license' @@ -256,7 +256,7 @@ PrivateData = @{ } # End of PSData hashtable - } # End of PrivateData hashtable +} # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' diff --git a/src/Compute/Compute/ChangeLog.md b/src/Compute/Compute/ChangeLog.md index 382d272415f3..846ead9205dd 100644 --- a/src/Compute/Compute/ChangeLog.md +++ b/src/Compute/Compute/ChangeLog.md @@ -20,6 +20,7 @@ --> ## Upcoming Release +* Added parameters `PackageFileName`, `ConfigFileName` for `New-AzGalleryApplicationVersion` ## Version 4.29.0 * Added image alias 'Win2022AzureEditionCore' diff --git a/src/Compute/Compute/help/Add-AzVhd.md b/src/Compute/Compute/help/Add-AzVhd.md index 1371fe26593b..ccec61a7da8c 100644 --- a/src/Compute/Compute/help/Add-AzVhd.md +++ b/src/Compute/Compute/help/Add-AzVhd.md @@ -16,8 +16,8 @@ Uploads a virtual hard disk from an on-premises machine to Azure (managed disk o ### DefaultParameterSet (Default) ``` Add-AzVhd [-ResourceGroupName] [-Destination] [-LocalFilePath] - [[-NumberOfUploaderThreads] ] [[-BaseImageUriToPatch] ] [-OverWrite] [-SkipResizing] - [-AsJob] [-DefaultProfile ] [] + [[-NumberOfUploaderThreads] ] [[-BaseImageUriToPatch] ] [-OverWrite] [-SkipResizing] [-AsJob] + [-DefaultProfile ] [] ``` ### DirectUploadToManagedDiskSet diff --git a/src/Compute/Compute/help/Add-AzVmGalleryApplication.md b/src/Compute/Compute/help/Add-AzVmGalleryApplication.md index a59299eec98c..7015623b62c3 100644 --- a/src/Compute/Compute/help/Add-AzVmGalleryApplication.md +++ b/src/Compute/Compute/help/Add-AzVmGalleryApplication.md @@ -38,7 +38,7 @@ This example creates a local VMGalleryApplication object and adds it to a PSVirt The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: IAzureContextContainer +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer Parameter Sets: (All) Aliases: AzContext, AzureRmContext, AzureCredential @@ -53,7 +53,7 @@ Accept wildcard characters: False PSVMGalleryApplication Object. ```yaml -Type: PSVMGalleryApplication +Type: Microsoft.Azure.Commands.Compute.Automation.Models.PSVMGalleryApplication Parameter Sets: (All) Aliases: @@ -68,7 +68,7 @@ Accept wildcard characters: False Order in which the application will be install in. ```yaml -Type: Int32 +Type: System.Int32 Parameter Sets: (All) Aliases: @@ -83,7 +83,7 @@ Accept wildcard characters: False If true, any failure for any operation in the VmApplication will fail the deployment. Defaults to false if not specified. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: @@ -98,7 +98,7 @@ Accept wildcard characters: False The PSVirtualMachine object to add a Gallery Application Reference ID. ```yaml -Type: PSVirtualMachine +Type: Microsoft.Azure.Commands.Compute.Models.PSVirtualMachine Parameter Sets: (All) Aliases: @@ -113,7 +113,7 @@ Accept wildcard characters: False Prompts you for confirmation before running the cmdlet. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: cf @@ -128,7 +128,7 @@ Accept wildcard characters: False Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: wi diff --git a/src/Compute/Compute/help/Add-AzVmssGalleryApplication.md b/src/Compute/Compute/help/Add-AzVmssGalleryApplication.md index 350655ead47f..30a2e2a1b468 100644 --- a/src/Compute/Compute/help/Add-AzVmssGalleryApplication.md +++ b/src/Compute/Compute/help/Add-AzVmssGalleryApplication.md @@ -38,7 +38,7 @@ This example creates a local VMGalleryApplication object and adds it to a PSVirt The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: IAzureContextContainer +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer Parameter Sets: (All) Aliases: AzContext, AzureRmContext, AzureCredential @@ -53,7 +53,7 @@ Accept wildcard characters: False VM Gallery Application Object. ```yaml -Type: PSVMGalleryApplication +Type: Microsoft.Azure.Commands.Compute.Automation.Models.PSVMGalleryApplication Parameter Sets: (All) Aliases: @@ -68,7 +68,7 @@ Accept wildcard characters: False Order in which the application will be install in. ```yaml -Type: Int32 +Type: System.Int32 Parameter Sets: (All) Aliases: @@ -83,7 +83,7 @@ Accept wildcard characters: False If true, any failure for any operation in the VmApplication will fail the deployment. Defaults to false if not specified. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: @@ -98,7 +98,7 @@ Accept wildcard characters: False The PSVirtualMachineScaleSetVMProfile object to add a Gallery Application Reference ID. ```yaml -Type: PSVirtualMachineScaleSetVMProfile +Type: Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSetVMProfile Parameter Sets: (All) Aliases: @@ -113,7 +113,7 @@ Accept wildcard characters: False Prompts you for confirmation before running the cmdlet. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: cf @@ -128,7 +128,7 @@ Accept wildcard characters: False Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: wi diff --git a/src/Compute/Compute/help/Add-AzVmssRunCommand.md b/src/Compute/Compute/help/Add-AzVmssRunCommand.md index 948d00c483c8..79361eb1d763 100644 --- a/src/Compute/Compute/help/Add-AzVmssRunCommand.md +++ b/src/Compute/Compute/help/Add-AzVmssRunCommand.md @@ -39,7 +39,7 @@ Adding Run Command to All VMSS Instances ### Example 1 ```powershell -Add-AzVmssRunCommand -ResourceGroupName $rgname -VMScaleSetName $vmssname -Location eastus -Name myruncommand -Script "Write-Host Hello World" -TimeOutInSeconds 3600 -RunAsUser "admin01" +Add-AzVmssRunCommand -ResourceGroupName $rgname -VMScaleSetName $vmssname -Location eastus -Name myruncommand -Script "Write-Host Hello World" -TimeOutInSeconds 3600 -RunAsUser "admin01" ``` Adding 'myruncommand' to VMSS @@ -50,7 +50,7 @@ Adding 'myruncommand' to VMSS Run cmdlet in the background ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: @@ -65,7 +65,7 @@ Accept wildcard characters: False Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete. ```yaml -Type: Boolean +Type: System.Nullable`1[System.Boolean] Parameter Sets: (All) Aliases: @@ -80,7 +80,7 @@ Accept wildcard characters: False RunCommand Id ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -95,7 +95,7 @@ Accept wildcard characters: False The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: IAzureContextContainer +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer Parameter Sets: (All) Aliases: AzContext, AzureRmContext, AzureCredential @@ -110,7 +110,7 @@ Accept wildcard characters: False Specifies the Azure storage blob where script error stream will be uploaded. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -125,7 +125,7 @@ Accept wildcard characters: False Resource location ```yaml -Type: String +Type: System.String Parameter Sets: DefaultParameter Aliases: @@ -140,7 +140,7 @@ Accept wildcard characters: False Resource name ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -155,7 +155,7 @@ Accept wildcard characters: False Specifies the Azure storage blob where script output stream will be uploaded. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -170,7 +170,7 @@ Accept wildcard characters: False The parameters used by the script. ```yaml -Type: Hashtable +Type: System.Collections.Hashtable Parameter Sets: (All) Aliases: @@ -185,7 +185,7 @@ Accept wildcard characters: False The parameters used by the script. ```yaml -Type: Hashtable +Type: System.Collections.Hashtable Parameter Sets: (All) Aliases: @@ -200,7 +200,7 @@ Accept wildcard characters: False Resource Group Name ```yaml -Type: String +Type: System.String Parameter Sets: DefaultParameter Aliases: @@ -215,7 +215,7 @@ Accept wildcard characters: False Specifies the user account password on the VM when executing the run command. ```yaml -Type: SecureString +Type: System.Security.SecureString Parameter Sets: (All) Aliases: @@ -230,7 +230,7 @@ Accept wildcard characters: False Specifies the user account on the VM when executing the run command. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -245,7 +245,7 @@ Accept wildcard characters: False The source of the run command script. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -260,7 +260,7 @@ Accept wildcard characters: False The Path of source of the run command script. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -275,7 +275,7 @@ Accept wildcard characters: False The Uri source of the run command script. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -290,7 +290,7 @@ Accept wildcard characters: False The timeout in seconds to execute the run command. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -305,7 +305,7 @@ Accept wildcard characters: False The VirtualMachineScaleSetVM ```yaml -Type: PSVirtualMachineScaleSetVM +Type: Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSetVM Parameter Sets: ObjectParameter Aliases: @@ -320,7 +320,7 @@ Accept wildcard characters: False The VirtualMachineScaleSet ```yaml -Type: String +Type: System.String Parameter Sets: DefaultParameter Aliases: @@ -335,7 +335,7 @@ Accept wildcard characters: False Prompts you for confirmation before running the cmdlet. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: cf @@ -351,7 +351,7 @@ Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: wi diff --git a/src/Compute/Compute/help/Az.Compute.md b/src/Compute/Compute/help/Az.Compute.md index 28f59ec32ce7..ba2215c77c1a 100644 --- a/src/Compute/Compute/help/Az.Compute.md +++ b/src/Compute/Compute/help/Az.Compute.md @@ -518,6 +518,9 @@ The operation to delete the VMSS VM run command. ### [Repair-AzVmssServiceFabricUpdateDomain](Repair-AzVmssServiceFabricUpdateDomain.md) Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set. +### [Restart-AzHost](Restart-AzHost.md) +Restart the dedicated host. + ### [Restart-AzVM](Restart-AzVM.md) Restarts an Azure virtual machine. diff --git a/src/Compute/Compute/help/Disable-AzVmssDiskEncryption.md b/src/Compute/Compute/help/Disable-AzVmssDiskEncryption.md index 86e0f986013a..cd722cd036cb 100644 --- a/src/Compute/Compute/help/Disable-AzVmssDiskEncryption.md +++ b/src/Compute/Compute/help/Disable-AzVmssDiskEncryption.md @@ -35,6 +35,8 @@ Disables disk encryption on the VM scale set named VMSS001 that belongs to the r Disables disk encryption on a VM scale set. (autogenerated) + + ```powershell Disable-AzVmssDiskEncryption -ResourceGroupName 'Group001' -VMScaleSetName 'VMSS001' -VolumeType OS ``` diff --git a/src/Compute/Compute/help/Export-AzLogAnalyticRequestRateByInterval.md b/src/Compute/Compute/help/Export-AzLogAnalyticRequestRateByInterval.md index a75e34dad126..54c334829425 100644 --- a/src/Compute/Compute/help/Export-AzLogAnalyticRequestRateByInterval.md +++ b/src/Compute/Compute/help/Export-AzLogAnalyticRequestRateByInterval.md @@ -147,6 +147,7 @@ Group query result by Application Id. Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: + Required: False Position: Named Default value: None @@ -206,6 +207,7 @@ Group query result by UserAgent. Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: + Required: False Position: Named Default value: None diff --git a/src/Compute/Compute/help/Export-AzLogAnalyticThrottledRequest.md b/src/Compute/Compute/help/Export-AzLogAnalyticThrottledRequest.md index 7a535ceceee4..a2fde3f33908 100644 --- a/src/Compute/Compute/help/Export-AzLogAnalyticThrottledRequest.md +++ b/src/Compute/Compute/help/Export-AzLogAnalyticThrottledRequest.md @@ -15,7 +15,7 @@ Export logs that show total throttled Api requests for this subscription in the ``` Export-AzLogAnalyticThrottledRequest [-Location] [-FromTime] [-ToTime] [-BlobContainerSasUri] [-GroupByOperationName] [-GroupByResourceName] [-GroupByThrottlePolicy] - [-GroupByApplicationId] [-GroupByUserAgent] [-AsJob] [-NoWait] [-DefaultProfile ] + [-GroupByApplicationId] [-GroupByUserAgent] [-AsJob] [-NoWait] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` @@ -118,6 +118,7 @@ Group query result by Application Id. Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: + Required: False Position: Named Default value: None @@ -177,6 +178,7 @@ Group query result by UserAgent. Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: + Required: False Position: Named Default value: None diff --git a/src/Compute/Compute/help/Get-AzCapacityReservation.md b/src/Compute/Compute/help/Get-AzCapacityReservation.md index b0c5ec4381df..eedf6827d1d3 100644 --- a/src/Compute/Compute/help/Get-AzCapacityReservation.md +++ b/src/Compute/Compute/help/Get-AzCapacityReservation.md @@ -2,7 +2,6 @@ external help file: Microsoft.Azure.PowerShell.Cmdlets.Compute.dll-Help.xml Module Name: Az.Compute online version: https://docs.microsoft.com/powershell/module/az.compute/get-azcapacityreservation - schema: 2.0.0 --- diff --git a/src/Compute/Compute/help/Get-AzDiskAccess.md b/src/Compute/Compute/help/Get-AzDiskAccess.md index 73a28cf5febe..de656753804e 100644 --- a/src/Compute/Compute/help/Get-AzDiskAccess.md +++ b/src/Compute/Compute/help/Get-AzDiskAccess.md @@ -27,7 +27,7 @@ The **Get-AzDiskAccess** cmdlet gets the properties of Disk Accesses ## EXAMPLES -### Example 1: Using Default Parameter Set +### Example 1: Using Default Parameter Set ```powershell Get-AzDiskAccess -ResourceGroupName 'ResourceGroup01' -Name 'DiskAccess01' ``` @@ -72,7 +72,6 @@ Tags : {} This command gets the properties of all disk accesses in the resource group 'ResourceGroup01'. - ### Example 3: Getting all Disk Access ```powershell Get-AzDiskAccess @@ -154,7 +153,6 @@ Tags : {} This command gets the properties of a Disk Access with the given ResourceId. - ## PARAMETERS ### -DefaultProfile diff --git a/src/Compute/Compute/help/Get-AzDiskEncryptionSet.md b/src/Compute/Compute/help/Get-AzDiskEncryptionSet.md index 4990d12da8fc..32dbe133b69e 100644 --- a/src/Compute/Compute/help/Get-AzDiskEncryptionSet.md +++ b/src/Compute/Compute/help/Get-AzDiskEncryptionSet.md @@ -159,7 +159,7 @@ Required: False Position: 0 Default value: None Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False +Accept wildcard characters: True ``` ### CommonParameters diff --git a/src/Compute/Compute/help/Get-AzDiskEncryptionSetAssociatedResource.md b/src/Compute/Compute/help/Get-AzDiskEncryptionSetAssociatedResource.md index f7fe2031a2d3..4c70e530c502 100644 --- a/src/Compute/Compute/help/Get-AzDiskEncryptionSetAssociatedResource.md +++ b/src/Compute/Compute/help/Get-AzDiskEncryptionSetAssociatedResource.md @@ -39,7 +39,7 @@ The cmdlet retrieves the two resources, 'exampleDisk01' and 'exampleDisk02', ass The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: IAzureContextContainer +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer Parameter Sets: (All) Aliases: AzContext, AzureRmContext, AzureCredential @@ -54,7 +54,7 @@ Accept wildcard characters: False Name of disk encryption set. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: Name @@ -69,7 +69,7 @@ Accept wildcard characters: False Specifies the name of a resource group. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -77,7 +77,7 @@ Required: True Position: 0 Default value: None Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False +Accept wildcard characters: True ``` ### CommonParameters diff --git a/src/Compute/Compute/help/Get-AzGallery.md b/src/Compute/Compute/help/Get-AzGallery.md index 4a299a4b541d..cc060a436d73 100644 --- a/src/Compute/Compute/help/Get-AzGallery.md +++ b/src/Compute/Compute/help/Get-AzGallery.md @@ -193,6 +193,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Expand +The expand query option to apply on the operation. Possible value(s): "SharingProfile/Groups" + +```yaml +Type: System.String +Parameter Sets: DefaultParameter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + ### -GalleryUniqueName The unique name of the Shared Image Gallery. @@ -283,21 +298,6 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` -### -Expand -The expand query option to apply on the operation. Possible value(s): "SharingProfile/Groups" - -```yaml -Type: System.String -Parameter Sets: DefaultParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Compute/Compute/help/Get-AzGalleryApplication.md b/src/Compute/Compute/help/Get-AzGalleryApplication.md index 3b2c136fdd40..d22878a90653 100644 --- a/src/Compute/Compute/help/Get-AzGalleryApplication.md +++ b/src/Compute/Compute/help/Get-AzGalleryApplication.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.Compute-help.xml Module Name: Az.Compute online version: https://docs.microsoft.com/powershell/module/az.compute/get-azgalleryapplication schema: 2.0.0 @@ -70,7 +70,7 @@ The name of the Shared Application Gallery from which the Application Definition ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -116,7 +116,7 @@ The name of the resource group. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -132,7 +132,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String[] -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: False @@ -151,7 +151,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication ## NOTES @@ -162,7 +162,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT ``: Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. @@ -179,4 +179,3 @@ INPUTOBJECT ``: Identity Parameter - `[VMScaleSetName ]`: The name of the VM scale set. ## RELATED LINKS - diff --git a/src/Compute/Compute/help/Get-AzGalleryApplicationVersion.md b/src/Compute/Compute/help/Get-AzGalleryApplicationVersion.md index ba5c79a8d72d..df9f46ddf3f7 100644 --- a/src/Compute/Compute/help/Get-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute/help/Get-AzGalleryApplicationVersion.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.Compute-help.xml Module Name: Az.Compute online version: https://docs.microsoft.com/powershell/module/az.compute/get-azgalleryapplicationversion schema: 2.0.0 @@ -39,7 +39,6 @@ Retrieves information about a gallery Application Version. ### Example 1: Get a Gallery Application Version ```powershell Get-AzGalleryApplicationVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryApplicationName $galleryAppName -Name $versionName - ``` Retrieve a Gallery Application Version resource with the provided Resource Group, Gallery, Gallery Application name, and version name. @@ -47,7 +46,6 @@ Retrieve a Gallery Application Version resource with the provided Resource Group ### Example 2: Get all the Gallery Application Versions in a GalleryApplication ```powershell Get-AzGalleryApplicationVersion -GalleryName $GalleryName -ResourceGroupName $rgName -GalleryApplicationName $galleryAppName - ``` Retrieve all the Gallery Application Version resources in the provided Resource Group, Gallery, and Gallery Application Name. @@ -89,7 +87,7 @@ The name of the gallery Application Definition in which the Application Version ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -104,7 +102,7 @@ The name of the Shared Application Gallery in which the Application Definition r ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -150,7 +148,7 @@ The name of the resource group. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -166,7 +164,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String[] -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: False @@ -185,7 +183,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion ## NOTES @@ -196,7 +194,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT ``: Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. @@ -213,4 +211,3 @@ INPUTOBJECT ``: Identity Parameter - `[VMScaleSetName ]`: The name of the VM scale set. ## RELATED LINKS - diff --git a/src/Compute/Compute/help/Get-AzGalleryImageVersion.md b/src/Compute/Compute/help/Get-AzGalleryImageVersion.md index 181e5a493d64..157a31f2a3cd 100644 --- a/src/Compute/Compute/help/Get-AzGalleryImageVersion.md +++ b/src/Compute/Compute/help/Get-AzGalleryImageVersion.md @@ -257,7 +257,7 @@ The name of the gallery image definition. ```yaml Type: System.String Parameter Sets: DefaultParameter, SharedGalleryParameterSet -Aliases: +Aliases: GalleryImageName Required: True Position: 2 diff --git a/src/Compute/Compute/help/Get-AzRestorePointCollection.md b/src/Compute/Compute/help/Get-AzRestorePointCollection.md index eb25934f06e0..00c9099b144b 100644 --- a/src/Compute/Compute/help/Get-AzRestorePointCollection.md +++ b/src/Compute/Compute/help/Get-AzRestorePointCollection.md @@ -14,7 +14,7 @@ Get a Restore Point Collection ``` Get-AzRestorePointCollection [-ResourceGroupName] [-Name] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [] ``` ## DESCRIPTION @@ -35,7 +35,7 @@ Used to get Restore Point Collection The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: IAzureContextContainer +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer Parameter Sets: (All) Aliases: AzContext, AzureRmContext, AzureCredential @@ -50,7 +50,7 @@ Accept wildcard characters: False Resource Name ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: RestorePointCollectionName @@ -65,7 +65,7 @@ Accept wildcard characters: False Resource Group Name ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -76,37 +76,6 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Compute/Compute/help/Get-AzSshKey.md b/src/Compute/Compute/help/Get-AzSshKey.md index 8476ab39512f..32484b9b3ece 100644 --- a/src/Compute/Compute/help/Get-AzSshKey.md +++ b/src/Compute/Compute/help/Get-AzSshKey.md @@ -15,12 +15,13 @@ Gets the properties of SSH Public Key resources. ### DefaultParameterSet (Default) ``` Get-AzSshKey [-ResourceGroupName ] [-Name ] [-DefaultProfile ] - [] + [-WhatIf] [-Confirm] [] ``` ### ResourceIDParameterSet ``` -Get-AzSshKey [-ResourceId] [-DefaultProfile ] [] +Get-AzSshKey -ResourceId [-DefaultProfile ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -44,7 +45,7 @@ This example retrieves a list of Ssh Public Key resources that are in Resource G ### Example 3 ```powershell -Get-AzSshKey +Get-AzSshKey ``` This example retrieves all the Ssh Public Key resources in the subscription. @@ -71,7 +72,7 @@ Specifies the name of the Ssh Public Key resource to get. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: DefaultParameterSet Aliases: sshkeyName Required: False @@ -86,7 +87,7 @@ Specifies the name of a resource group. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: DefaultParameterSet Aliases: Required: False @@ -105,12 +106,42 @@ Parameter Sets: ResourceIDParameterSet Aliases: Required: True -Position: 0 +Position: Named Default value: None Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Compute/Compute/help/Get-AzVM.md b/src/Compute/Compute/help/Get-AzVM.md index 63213ba91088..f7f3974311c8 100644 --- a/src/Compute/Compute/help/Get-AzVM.md +++ b/src/Compute/Compute/help/Get-AzVM.md @@ -327,7 +327,7 @@ Required: False Position: 1 Default value: None Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False +Accept wildcard characters: True ``` ```yaml @@ -339,7 +339,7 @@ Required: True Position: 1 Default value: None Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False +Accept wildcard characters: True ``` ### -NextLink @@ -369,7 +369,7 @@ Required: False Position: 0 Default value: None Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False +Accept wildcard characters: True ``` ```yaml @@ -381,7 +381,7 @@ Required: True Position: 0 Default value: None Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False +Accept wildcard characters: True ``` ### -ResourceId diff --git a/src/Compute/Compute/help/Get-AzVMADDomainExtension.md b/src/Compute/Compute/help/Get-AzVMADDomainExtension.md index 8f7f972f9470..ee0f5dbfd253 100644 --- a/src/Compute/Compute/help/Get-AzVMADDomainExtension.md +++ b/src/Compute/Compute/help/Get-AzVMADDomainExtension.md @@ -28,6 +28,8 @@ The **Get-AzVMADDomainExtension** cmdlet gets information about the specified Az Gets information about an AD domain extension. (autogenerated) + + ```powershell Get-AzVMADDomainExtension -Name 'AgentPool01' -ResourceGroupName myresourcegroup -VMName 'VM01' ``` diff --git a/src/Compute/Compute/help/Get-AzVMDiagnosticsExtension.md b/src/Compute/Compute/help/Get-AzVMDiagnosticsExtension.md index c0582f6c67ef..f41d6049d750 100644 --- a/src/Compute/Compute/help/Get-AzVMDiagnosticsExtension.md +++ b/src/Compute/Compute/help/Get-AzVMDiagnosticsExtension.md @@ -35,6 +35,8 @@ This command gets the diagnostics extension applied to the virtual machine named Gets the settings of the Diagnostics extension on a virtual machine. (autogenerated) + + ```powershell Get-AzVMDiagnosticsExtension -Name 'AgentPool01' -ResourceGroupName 'ResourceGroup11' -Status -VMName 'ContosoVM22' ``` diff --git a/src/Compute/Compute/help/Get-AzVMDscExtensionStatus.md b/src/Compute/Compute/help/Get-AzVMDscExtensionStatus.md index 800a726b6917..9dab3e7c1975 100644 --- a/src/Compute/Compute/help/Get-AzVMDscExtensionStatus.md +++ b/src/Compute/Compute/help/Get-AzVMDscExtensionStatus.md @@ -36,6 +36,8 @@ When a configuration is applied this cmdlet produces output consistent with the Gets the status of the DSC extension handler for a virtual machine. (autogenerated) + + ```powershell Get-AzVMDscExtensionStatus -Name 'AgentPool01' -ResourceGroupName myresourcegroup -VMName 'VM01' ``` diff --git a/src/Compute/Compute/help/Get-AzVMRunCommand.md b/src/Compute/Compute/help/Get-AzVMRunCommand.md index 9a551b53622e..a14afd361bfb 100644 --- a/src/Compute/Compute/help/Get-AzVMRunCommand.md +++ b/src/Compute/Compute/help/Get-AzVMRunCommand.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.Compute-help.xml Module Name: Az.Compute online version: https://docs.microsoft.com/powershell/module/az.compute/get-azvmruncommand schema: 2.0.0 @@ -24,21 +24,21 @@ Get-AzVMRunCommand -CommandId -Location [-SubscriptionId ] [] ``` -### Get1 +### List1 ``` -Get-AzVMRunCommand -ResourceGroupName -RunCommandName -VMName - [-SubscriptionId ] [-Expand ] [-DefaultProfile ] [] +Get-AzVMRunCommand [-SubscriptionId ] -ResourceGroupName -VMName [-Expand ] + [-DefaultProfile ] [] ``` -### GetViaIdentity +### Get1 ``` -Get-AzVMRunCommand -InputObject [-DefaultProfile ] [] +Get-AzVMRunCommand [-SubscriptionId ] -ResourceGroupName -RunCommandName + -VMName [-Expand ] [-DefaultProfile ] [] ``` -### List1 +### GetViaIdentity ``` -Get-AzVMRunCommand -ResourceGroupName -VMName [-SubscriptionId ] - [-Expand ] [-DefaultProfile ] [] +Get-AzVMRunCommand -InputObject [-DefaultProfile ] [] ``` ## DESCRIPTION @@ -57,11 +57,11 @@ Location Name Type eastus firstruncommand2 Microsoft.Compute/virtualMachines/runCommands ``` -Get Run Command by its name. +Get Run Command by it's name. ### Example 2: Get Run Commands by VM ```powershell -Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname +Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname ``` ```output @@ -77,7 +77,7 @@ Get Run Commands by VM name ## PARAMETERS ### -CommandId -The command ID. +The command id. ```yaml Type: System.String @@ -111,7 +111,7 @@ The expand expression to apply on the operation. ```yaml Type: System.String -Parameter Sets: Get1, List1 +Parameter Sets: List1, Get1 Aliases: Required: False @@ -142,7 +142,7 @@ The location upon which run commands is queried. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -157,7 +157,7 @@ The name of the resource group. ```yaml Type: System.String -Parameter Sets: Get1, List1 +Parameter Sets: List1, Get1 Aliases: Required: True @@ -188,7 +188,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String[] -Parameter Sets: Get, Get1, List, List1 +Parameter Sets: List, Get, List1, Get1 Aliases: Required: False @@ -203,7 +203,7 @@ The name of the virtual machine containing the run command. ```yaml Type: System.String -Parameter Sets: Get1, List1 +Parameter Sets: List1, Get1 Aliases: Required: True @@ -237,7 +237,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT ``: Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. @@ -254,4 +254,3 @@ INPUTOBJECT ``: Identity Parameter - `[VMScaleSetName ]`: The name of the VM scale set. ## RELATED LINKS - diff --git a/src/Compute/Compute/help/Get-AzVmssVMRunCommand.md b/src/Compute/Compute/help/Get-AzVmssVMRunCommand.md index 33d4f8905a87..48c3048a9f68 100644 --- a/src/Compute/Compute/help/Get-AzVmssVMRunCommand.md +++ b/src/Compute/Compute/help/Get-AzVmssVMRunCommand.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.Compute-help.xml Module Name: Az.Compute online version: https://docs.microsoft.com/powershell/module/az.compute/get-azvmssvmruncommand schema: 2.0.0 @@ -14,14 +14,14 @@ The operation to get the VMSS VM run command. ### List (Default) ``` -Get-AzVmssVMRunCommand -InstanceId -ResourceGroupName -VMScaleSetName - [-SubscriptionId ] [-Expand ] [-DefaultProfile ] [] +Get-AzVmssVMRunCommand -InstanceId -ResourceGroupName [-SubscriptionId ] + -VMScaleSetName [-Expand ] [-DefaultProfile ] [] ``` ### Get ``` Get-AzVmssVMRunCommand -InstanceId -ResourceGroupName -RunCommandName - -VMScaleSetName [-SubscriptionId ] [-Expand ] [-DefaultProfile ] + [-SubscriptionId ] -VMScaleSetName [-Expand ] [-DefaultProfile ] [] ``` @@ -115,7 +115,7 @@ The instance ID of the virtual machine. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -130,7 +130,7 @@ The name of the resource group. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -161,7 +161,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String[] -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: False @@ -176,7 +176,7 @@ The name of the VM scale set. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -206,7 +206,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT ``: Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. @@ -223,4 +223,3 @@ INPUTOBJECT ``: Identity Parameter - `[VMScaleSetName ]`: The name of the VM scale set. ## RELATED LINKS - diff --git a/src/Compute/Compute/help/Invoke-AzVMPatchAssessment.md b/src/Compute/Compute/help/Invoke-AzVMPatchAssessment.md index 293e37a6e3e7..b617428ac46e 100644 --- a/src/Compute/Compute/help/Invoke-AzVMPatchAssessment.md +++ b/src/Compute/Compute/help/Invoke-AzVMPatchAssessment.md @@ -25,8 +25,8 @@ Invoke-AzVMPatchAssessment [-ResourceId] [-AsJob] [-DefaultProfile [-AsJob] [-DefaultProfile ] [-WhatIf] - [-Confirm] [] +Invoke-AzVMPatchAssessment [-VM] [-AsJob] [-DefaultProfile ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/src/Compute/Compute/help/New-AzDisk.md b/src/Compute/Compute/help/New-AzDisk.md index 2684faf25df5..21f0464ae40d 100644 --- a/src/Compute/Compute/help/New-AzDisk.md +++ b/src/Compute/Compute/help/New-AzDisk.md @@ -213,7 +213,6 @@ Accept wildcard characters: False ``` ### CommonParameters - This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/src/Compute/Compute/help/New-AzDiskConfig.md b/src/Compute/Compute/help/New-AzDiskConfig.md index 55489edfe022..b607ee6a2a07 100644 --- a/src/Compute/Compute/help/New-AzDiskConfig.md +++ b/src/Compute/Compute/help/New-AzDiskConfig.md @@ -24,8 +24,8 @@ New-AzDiskConfig [[-SkuName] ] [-Tier ] [-LogicalSectorSize ] [-KeyEncryptionKey ] [-DiskEncryptionSetId ] [-EncryptionType ] [-DiskAccessId ] [-NetworkAccessPolicy ] [-BurstingEnabled ] [-PublicNetworkAccess ] - [-AcceleratedNetwork ] [-DataAccessAuthMode ] [-Architecture ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-AcceleratedNetwork ] [-DataAccessAuthMode ] [-Architecture ] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/src/Compute/Compute/help/New-AzDiskPurchasePlanConfig.md b/src/Compute/Compute/help/New-AzDiskPurchasePlanConfig.md index 922d6a14dbb2..ce90880a1f15 100644 --- a/src/Compute/Compute/help/New-AzDiskPurchasePlanConfig.md +++ b/src/Compute/Compute/help/New-AzDiskPurchasePlanConfig.md @@ -13,8 +13,8 @@ Creates a PurchasePlan Object ## SYNTAX ``` -New-AzDiskPurchasePlanConfig [-Publisher ] [-Name ] [-Product ] - [-PromotionCode ] [-DefaultProfile ] [] +New-AzDiskPurchasePlanConfig -Publisher -Name -Product [-PromotionCode ] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -38,7 +38,7 @@ Customers can set the PurchasePlan on the Managed Disks. The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: IAzureContextContainer +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer Parameter Sets: (All) Aliases: AzContext, AzureRmContext, AzureCredential @@ -53,7 +53,7 @@ Accept wildcard characters: False Name of Config ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -68,7 +68,7 @@ Accept wildcard characters: False Name of Product ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -83,7 +83,7 @@ Accept wildcard characters: False PromotionCode for Purchase Plan ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -98,7 +98,7 @@ Accept wildcard characters: False Name of Publisher ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -109,6 +109,36 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Compute/Compute/help/New-AzDiskUpdateConfig.md b/src/Compute/Compute/help/New-AzDiskUpdateConfig.md index 83b2a270a927..c8e547413107 100644 --- a/src/Compute/Compute/help/New-AzDiskUpdateConfig.md +++ b/src/Compute/Compute/help/New-AzDiskUpdateConfig.md @@ -20,8 +20,8 @@ New-AzDiskUpdateConfig [[-SkuName] ] [-Tier ] [-DiskIOPSReadOnly [-EncryptionSettingsEnabled ] [-DiskEncryptionKey ] [-KeyEncryptionKey ] [-DiskEncryptionSetId ] [-EncryptionType ] [-BurstingEnabled ] [-PublicNetworkAccess ] [-AcceleratedNetwork ] - [-DataAccessAuthMode ] [-Architecture ] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] + [-DataAccessAuthMode ] [-Architecture ] [-DefaultProfile ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION diff --git a/src/Compute/Compute/help/New-AzGalleryApplication.md b/src/Compute/Compute/help/New-AzGalleryApplication.md index 05a0b93af5cc..da6553e536ae 100644 --- a/src/Compute/Compute/help/New-AzGalleryApplication.md +++ b/src/Compute/Compute/help/New-AzGalleryApplication.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.Compute-help.xml Module Name: Az.Compute online version: https://docs.microsoft.com/powershell/module/az.compute/new-azgalleryapplication schema: 2.0.0 @@ -13,9 +13,9 @@ Create or update a gallery Application Definition. ## SYNTAX ``` -New-AzGalleryApplication -GalleryName -Name -ResourceGroupName -Location - -SupportedOSType [-SubscriptionId ] [-Description ] [-Tag ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +New-AzGalleryApplication -GalleryName -Name -ResourceGroupName + [-SubscriptionId ] -Location -SupportedOSType [-Description ] + [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -23,10 +23,9 @@ Create or update a gallery Application Definition. ## EXAMPLES -### Example 1: Create a gallery application +### Example 1: Create a gallery application ```powershell New-AzGalleryApplication -ResourceGroupName $rgName -Location EastUS -GalleryName $galleryName -Name $name -SupportedOSType Windows - ``` Creating a Gallery Application in a Gallery. @@ -247,11 +246,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication ## NOTES ALIASES ## RELATED LINKS - diff --git a/src/Compute/Compute/help/New-AzGalleryApplicationVersion.md b/src/Compute/Compute/help/New-AzGalleryApplicationVersion.md index 270264e66cc1..b440c668e6bb 100644 --- a/src/Compute/Compute/help/New-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute/help/New-AzGalleryApplicationVersion.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.Compute-help.xml Module Name: Az.Compute online version: https://docs.microsoft.com/powershell/module/az.compute/new-azgalleryapplicationversion schema: 2.0.0 @@ -14,11 +14,11 @@ Create or update a gallery Application Version. ``` New-AzGalleryApplicationVersion -GalleryApplicationName -GalleryName -Name - -ResourceGroupName -Install -Location -Remove [-SubscriptionId ] + -ResourceGroupName [-SubscriptionId ] -Location -Install -Remove [-DefaultConfigFileLink ] [-PackageFileLink ] [-PublishingProfileEndOfLifeDate ] [-PublishingProfileExcludeFromLatest] [-ReplicaCount ] [-Tag ] - [-TargetRegion ] [-Update ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-Confirm] [-WhatIf] [] + [-TargetRegion ] [-Update ] [-PackageFileName ] [-ConfigFileName ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -29,13 +29,12 @@ Create or update a gallery Application Version. ### Example 1: Create a gallery application version. ```powershell $ctx = New-AzStorageContext -StorageAccountName $storAccName -$SASToken = New-AzStorageBlobSASToken -Context $ctx -Container $containerName -blob $blobName -Permission r +$SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r $storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName $blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context $SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context $SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken -New-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -Install "powershell -command 'Expand-Archive -Path package.zip -DestinationPath C:\\package\'" -Remove "del C:\\package" - +New-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -Install "powershell -command 'Expand-Archive -Path package.zip -DestinationPath C:\\package\'" -Remove "del C:\\package" ``` Creating a Gallery Application Version. @@ -58,6 +57,24 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ConfigFileName +Optional. +The name to assign the downloaded config file on the VM. +This is limited to 4096 characters. +If not specified, the config file will be named the Gallery Application name appended with "_config". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -DefaultConfigFileLink Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. @@ -200,6 +217,24 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -PackageFileName +Optional. +The name to assign the downloaded package file on the VM. +This is limited to 4096 characters. +If not specified, the package file will be named the same as the Gallery Application name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PublishingProfileEndOfLifeDate The end of life date of the gallery image version. This property can be used for decommissioning purposes. @@ -318,7 +353,7 @@ This property is updatable. To construct, see NOTES section for TARGETREGION properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] +Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] Parameter Sets: (All) Aliases: @@ -385,7 +420,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion ## NOTES @@ -396,14 +431,15 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -TARGETREGION : The target regions where the Image Version is going to be replicated to. This property is updatable. +`TARGETREGION `: The target regions where the Image Version is going to be replicated to. This property is updatable. - `Name `: The name of the region. - `[EncryptionDataDiskImage ]`: A list of encryption specifications for data disk images. - `Lun `: This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. - `[DiskEncryptionSetId ]`: A relative URI containing the resource ID of the disk encryption set. - `[OSDiskImageDiskEncryptionSetId ]`: A relative URI containing the resource ID of the disk encryption set. - `[RegionalReplicaCount ]`: The number of replicas of the Image Version to be created per region. This property is updatable. + - `[SecurityProfileConfidentialVMEncryptionType ]`: confidential VM encryption types + - `[SecurityProfileSecureVMDiskEncryptionSetId ]`: secure VM disk encryption set id - `[StorageAccountType ]`: Specifies the storage account type to be used to store the image. This property is not updatable. ## RELATED LINKS - diff --git a/src/Compute/Compute/help/New-AzGalleryImageVersion.md b/src/Compute/Compute/help/New-AzGalleryImageVersion.md index 89053dd8dc30..4b06e46da9c6 100644 --- a/src/Compute/Compute/help/New-AzGalleryImageVersion.md +++ b/src/Compute/Compute/help/New-AzGalleryImageVersion.md @@ -286,7 +286,7 @@ The name of the gallery. ```yaml Type: System.String Parameter Sets: (All) -Aliases: +Aliases: GalleryImageName Required: True Position: 2 @@ -521,7 +521,6 @@ Accept wildcard characters: False ``` ### CommonParameters - This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/src/Compute/Compute/help/New-AzHostGroup.md b/src/Compute/Compute/help/New-AzHostGroup.md index ab94eecc1662..3cd0f27c4dc5 100644 --- a/src/Compute/Compute/help/New-AzHostGroup.md +++ b/src/Compute/Compute/help/New-AzHostGroup.md @@ -48,7 +48,7 @@ This command creates a host group in the given location and zone. Run cmdlet in the background ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: @@ -63,7 +63,7 @@ Accept wildcard characters: False The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: IAzureContextContainer +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer Parameter Sets: (All) Aliases: AzContext, AzureRmContext, AzureCredential @@ -78,7 +78,7 @@ Accept wildcard characters: False The flag that enables or disables a capability to have UltraSSD Enabled Virtual Machines on Dedicated Hosts of the Dedicated Host Group. For the Virtual Machines to be UltraSSD Enabled, UltraSSDEnabled flag for the resource needs to be set true as well. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd for more details on Ultra SSD feature. The ultraSSDEnabled setting can only be enabled for Host Groups that are created as zonal. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: @@ -93,7 +93,7 @@ Accept wildcard characters: False Specifies location. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -108,7 +108,7 @@ Accept wildcard characters: False Specifies the name of the host group. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: HostGroupName @@ -123,7 +123,7 @@ Accept wildcard characters: False Specifies the number of fault domains that the host group can span. The minimum value is 1 and the maximum value is 3. ```yaml -Type: Int32 +Type: System.Int32 Parameter Sets: (All) Aliases: @@ -138,7 +138,7 @@ Accept wildcard characters: False The name of the resource group. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -155,7 +155,7 @@ Automatic placement means these VMs are placed on dedicated hosts, chosen by Azu If not specified, default value will be false. ```yaml -Type: Boolean +Type: System.Boolean Parameter Sets: (All) Aliases: @@ -170,7 +170,7 @@ Accept wildcard characters: False Specifies Tags ```yaml -Type: Hashtable +Type: System.Collections.Hashtable Parameter Sets: (All) Aliases: @@ -185,7 +185,7 @@ Accept wildcard characters: False Specifies Zones of the host group. ```yaml -Type: String[] +Type: System.String[] Parameter Sets: (All) Aliases: @@ -200,7 +200,7 @@ Accept wildcard characters: False Prompts you for confirmation before running the cmdlet. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: cf @@ -216,7 +216,7 @@ Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: wi diff --git a/src/Compute/Compute/help/New-AzImageConfig.md b/src/Compute/Compute/help/New-AzImageConfig.md index 2777ca218f31..ab7881e79002 100644 --- a/src/Compute/Compute/help/New-AzImageConfig.md +++ b/src/Compute/Compute/help/New-AzImageConfig.md @@ -13,9 +13,10 @@ Creates a configurable image object. ## SYNTAX ``` -New-AzImageConfig [[-Location] ] [-EdgeZone ] [[-Tag] ] [[-SourceVirtualMachineId] ] - [[-OsDisk] ] [-HyperVGeneration ] [-DataDisk ] [-ZoneResilient] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] +New-AzImageConfig [[-Location] ] [-EdgeZone ] [[-Tag] ] + [[-SourceVirtualMachineId] ] [[-OsDisk] ] [-HyperVGeneration ] + [-DataDisk ] [-ZoneResilient] [-DefaultProfile ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -75,8 +76,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HyperVGeneration -Specifies the HyperVGeneration Type for the virtual machine created from the image. Allowed values are V1 and V2. +### -EdgeZone +Sets the edge zone name. If set, the query will be routed to the specified edgezone instead of the main region. ```yaml Type: System.String @@ -90,8 +91,8 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` -### -Location -Specifies a location. +### -HyperVGeneration +Specifies the HyperVGeneration Type for the virtual machine created from the image. Allowed values are V1 and V2. ```yaml Type: System.String @@ -99,14 +100,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 0 +Position: Named Default value: None Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` -### -EdgeZone -Sets the edge zone name. If set, the query will be routed to the specified edgezone instead of the main region. +### -Location +Specifies a location. ```yaml Type: System.String @@ -114,7 +115,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: Named +Position: 0 Default value: None Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False diff --git a/src/Compute/Compute/help/New-AzProximityPlacementGroup.md b/src/Compute/Compute/help/New-AzProximityPlacementGroup.md index 8e409a393f67..9e41c12ea818 100644 --- a/src/Compute/Compute/help/New-AzProximityPlacementGroup.md +++ b/src/Compute/Compute/help/New-AzProximityPlacementGroup.md @@ -45,6 +45,8 @@ This command creates a proximity place group in the given location. Create Proximity Placement Group resource. (autogenerated) + + ```powershell New-AzProximityPlacementGroup -Location westus -Name 'AgentPool01' -ProximityPlacementGroupType -ResourceGroupName myresourcegroup ``` diff --git a/src/Compute/Compute/help/New-AzSnapshotConfig.md b/src/Compute/Compute/help/New-AzSnapshotConfig.md index e3dad97d9a58..49d12c45e307 100644 --- a/src/Compute/Compute/help/New-AzSnapshotConfig.md +++ b/src/Compute/Compute/help/New-AzSnapshotConfig.md @@ -21,8 +21,8 @@ New-AzSnapshotConfig [[-SkuName] ] [[-OsType] ] [[ [-DiskEncryptionKey ] [-KeyEncryptionKey ] [-DiskEncryptionSetId ] [-EncryptionType ] [-DiskAccessId ] [-NetworkAccessPolicy ] [-PublicNetworkAccess ] [-AcceleratedNetwork ] - [-DataAccessAuthMode ] [-Architecture ] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] + [-DataAccessAuthMode ] [-Architecture ] [-DefaultProfile ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -51,6 +51,8 @@ The last command takes the snapshot object and creates a snapshot with name 'Sna Creates a configurable snapshot object. (autogenerated) + + ```powershell New-AzSnapshotConfig -CreateOption Empty -Location 'Central US' -SourceUri 'https://contosoaccount.blob.core.windows.net/vhdstore/win7baseimage.vhd' ``` diff --git a/src/Compute/Compute/help/New-AzSnapshotUpdateConfig.md b/src/Compute/Compute/help/New-AzSnapshotUpdateConfig.md index cebf6d9e5e72..ba08d87b62ca 100644 --- a/src/Compute/Compute/help/New-AzSnapshotUpdateConfig.md +++ b/src/Compute/Compute/help/New-AzSnapshotUpdateConfig.md @@ -17,8 +17,8 @@ New-AzSnapshotUpdateConfig [[-SkuName] ] [[-OsType] ] [-SupportsHibernation ] [-EncryptionSettingsEnabled ] [-DiskEncryptionKey ] [-KeyEncryptionKey ] [-DiskEncryptionSetId ] [-EncryptionType ] [-PublicNetworkAccess ] - [-DataAccessAuthMode ] [-Architecture ] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] + [-DataAccessAuthMode ] [-Architecture ] [-DefaultProfile ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION diff --git a/src/Compute/Compute/help/New-AzSshKey.md b/src/Compute/Compute/help/New-AzSshKey.md index 00c0c2c7d6ca..0afb3014c6d6 100644 --- a/src/Compute/Compute/help/New-AzSshKey.md +++ b/src/Compute/Compute/help/New-AzSshKey.md @@ -14,7 +14,7 @@ Create a SSH Public Key resource. ``` New-AzSshKey -ResourceGroupName -Name [-PublicKey ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -31,7 +31,7 @@ Creating a SSH Key resource with provided a public key. ### Example 2 ```powershell -New-AzSshKey -ResourceGroupName "testRG" -Name "sshkey1" +New-AzSshKey -ResourceGroupName "testRG" -Name "sshkey1" ``` Creating a SSH Key resource without providing a public key. A key pair will be generated and saved in ~\.ssh. The public key will also be saved in the SSH Key resource. @@ -98,6 +98,36 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: True ``` +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Compute/Compute/help/New-AzVM.md b/src/Compute/Compute/help/New-AzVM.md index b66e5753d041..82105f42b636 100644 --- a/src/Compute/Compute/help/New-AzVM.md +++ b/src/Compute/Compute/help/New-AzVM.md @@ -25,9 +25,9 @@ New-AzVM [[-ResourceGroupName] ] [[-Location] ] [-EdgeZone ] [-HostId ] [-VmssId ] [-Priority ] [-EvictionPolicy ] [-MaxPrice ] [-EncryptionAtHost] [-HostGroupId ] [-SshKeyName ] [-GenerateSshKey] [-CapacityReservationGroupId ] - [-UserData ] [-ImageReferenceId ] [-PlatformFaultDomain ] [-HibernationEnabled] [-vCPUCountAvailable ] - [-vCPUCountPerCore ] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] + [-UserData ] [-ImageReferenceId ] [-PlatformFaultDomain ] [-HibernationEnabled] + [-vCPUCountAvailable ] [-vCPUCountPerCore ] [-DefaultProfile ] [-WhatIf] + [-Confirm] [] ``` ### DefaultParameterSet @@ -35,8 +35,8 @@ New-AzVM [[-ResourceGroupName] ] [[-Location] ] [-EdgeZone [-Location] [-EdgeZone ] [-VM] [[-Zone] ] [-DisableBginfoExtension] [-Tag ] [-LicenseType ] [-AsJob] [-OSDiskDeleteOption ] [-DataDiskDeleteOption ] [-SshKeyName ] [-GenerateSshKey] - [-vCPUCountAvailable ] [-vCPUCountPerCore ] [-DisableIntegrityMonitoring] [-DefaultProfile ] [-WhatIf] - [-Confirm] [] + [-vCPUCountAvailable ] [-vCPUCountPerCore ] [-DisableIntegrityMonitoring] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ### DiskFileParameterSet @@ -49,7 +49,7 @@ New-AzVM [[-ResourceGroupName] ] [[-Location] ] [-EdgeZone ] [-AsJob] [-OSDiskDeleteOption ] [-DataDiskSizeInGb ] [-DataDiskDeleteOption ] [-EnableUltraSSD] [-ProximityPlacementGroupId ] [-HostId ] [-VmssId ] [-Priority ] [-EvictionPolicy ] [-MaxPrice ] [-EncryptionAtHost] - [-HostGroupId ] [-CapacityReservationGroupId ] [-UserData ] [-ImageReferenceId ] + [-HostGroupId ] [-CapacityReservationGroupId ] [-UserData ] [-PlatformFaultDomain ] [-HibernationEnabled] [-vCPUCountAvailable ] [-vCPUCountPerCore ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` @@ -458,6 +458,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -DisableIntegrityMonitoring +This flag disables the default behavior to install the Guest Attestation extension to the virtual machine if: 1) SecurityType is TrustedLaunch, 2) SecureBootEnabled on the SecurityProfile is true, 3) VTpmEnabled on the SecurityProfile is true. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: DefaultParameterSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + ### -DiskFile The local path to the virtual hard disk file to be uploaded to the cloud and for creating the VM, and it must have '.vhd' as its suffix. @@ -625,6 +640,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ImageReferenceId +Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call. + +```yaml +Type: System.String +Parameter Sets: SimpleParameterSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -LicenseType Specifies a license type, which indicates that the image or disk for the virtual machine was licensed on-premises. Possible values for Windows Server are: @@ -868,20 +898,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ImageReferenceId -Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call. - -```yaml -Type: System.String -Parameter Sets: SimpleParameterSet, DiskFileParameterSet -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -Size The Virtual Machine Size. The Default Value is: Standard_D2s_v3. @@ -1034,21 +1050,6 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` -### -DisableIntegrityMonitoring -This flag disables the default behavior to install the Guest Attestation extension to the virtual machine if: 1) SecurityType is TrustedLaunch, 2) SecureBootEnabled on the SecurityProfile is true, 3) VTpmEnabled on the SecurityProfile is true. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: DefaultParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -VirtualNetworkName The name of a new (or existing) virtual network for the created VM to use. If not specified, a name will be generated. diff --git a/src/Compute/Compute/help/New-AzVMConfig.md b/src/Compute/Compute/help/New-AzVMConfig.md index f7ccfa1b0a98..ba6e82d34a90 100644 --- a/src/Compute/Compute/help/New-AzVMConfig.md +++ b/src/Compute/Compute/help/New-AzVMConfig.md @@ -18,8 +18,8 @@ Creates a configurable virtual machine object. New-AzVMConfig [-VMName] [-VMSize] [[-AvailabilitySetId] ] [[-LicenseType] ] [-Zone ] [-ProximityPlacementGroupId ] [-HostId ] [-VmssId ] [-MaxPrice ] [-EvictionPolicy ] [-Priority ] [-Tags ] [-EnableUltraSSD] - [-EncryptionAtHost] [-CapacityReservationGroupId ] [-ImageReferenceId ] [-UserData ] [-PlatformFaultDomain ] - [-HibernationEnabled] [-vCPUCountAvailable ] [-vCPUCountPerCore ] + [-EncryptionAtHost] [-CapacityReservationGroupId ] [-ImageReferenceId ] [-UserData ] + [-PlatformFaultDomain ] [-HibernationEnabled] [-vCPUCountAvailable ] [-vCPUCountPerCore ] [-DefaultProfile ] [] ``` @@ -29,8 +29,8 @@ New-AzVMConfig [-VMName] [-VMSize] [[-AvailabilitySetId] [-IdentityId ] [-Zone ] [-ProximityPlacementGroupId ] [-HostId ] [-VmssId ] [-MaxPrice ] [-EvictionPolicy ] [-Priority ] [-Tags ] [-EnableUltraSSD] [-EncryptionAtHost] - [-CapacityReservationGroupId ] [-ImageReferenceId ] [-UserData ] [-PlatformFaultDomain ] - [-HibernationEnabled] [-vCPUCountAvailable ] [-vCPUCountPerCore ] + [-CapacityReservationGroupId ] [-ImageReferenceId ] [-UserData ] + [-PlatformFaultDomain ] [-HibernationEnabled] [-vCPUCountAvailable ] [-vCPUCountPerCore ] [-DefaultProfile ] [] ``` @@ -216,6 +216,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ImageReferenceId +Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -LicenseType Specifies a license type, which indicates that the image or disk for the virtual machine was licensed on-premises. Possible values for Windows Server are: @@ -301,21 +316,6 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` -### -ImageReferenceId -Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -Tags The tags attached to the resource. diff --git a/src/Compute/Compute/help/New-AzVMDataDisk.md b/src/Compute/Compute/help/New-AzVMDataDisk.md index c108e7c04658..1cb1b1129e70 100644 --- a/src/Compute/Compute/help/New-AzVMDataDisk.md +++ b/src/Compute/Compute/help/New-AzVMDataDisk.md @@ -50,6 +50,8 @@ The final command updates the Vmss VM by adding a new data disk. Creates a local data disk object for a virtual machine or a Vmss VM. (autogenerated) + + ```powershell New-AzVMDataDisk -Caching None -CreateOption Attach -DiskSizeInGB 1 -Lun 2 -Name 'AgentPool01' ``` diff --git a/src/Compute/Compute/help/New-AzVmGalleryApplication.md b/src/Compute/Compute/help/New-AzVmGalleryApplication.md index a3d25b012648..8911b03419a9 100644 --- a/src/Compute/Compute/help/New-AzVmGalleryApplication.md +++ b/src/Compute/Compute/help/New-AzVmGalleryApplication.md @@ -1,7 +1,7 @@ --- external help file: Microsoft.Azure.PowerShell.Cmdlets.Compute.dll-Help.xml Module Name: Az.Compute -online version:https://docs.microsoft.com/powershell/module/az.compute/new-azvmgalleryapplication +online version: https://docs.microsoft.com/powershell/module/az.compute/new-azvmgalleryapplication schema: 2.0.0 --- @@ -14,7 +14,7 @@ Create a local PSVMGalleryApplication object. ``` New-AzVmGalleryApplication -PackageReferenceId [-ConfigReferenceId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -78,6 +78,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Compute/Compute/help/New-AzVmss.md b/src/Compute/Compute/help/New-AzVmss.md index b8e32d4104e9..bea333883256 100644 --- a/src/Compute/Compute/help/New-AzVmss.md +++ b/src/Compute/Compute/help/New-AzVmss.md @@ -16,19 +16,20 @@ Creates a VMSS. ### DefaultParameter (Default) ``` New-AzVmss [-ResourceGroupName] [-VMScaleSetName] - [-VirtualMachineScaleSet] [-DisableIntegrityMonitoring] [-AsJob] [-EdgeZone ] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-VirtualMachineScaleSet] [-AsJob] [-DisableIntegrityMonitoring] + [-EdgeZone ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ### SimpleParameterSet ``` New-AzVmss [[-ResourceGroupName] ] [-VMScaleSetName] [-AsJob] [-UserData ] - [-ImageName ] -Credential [-InstanceCount ] [-VirtualNetworkName ] - [-SubnetName ] [-PublicIpAddressName ] [-DomainNameLabel ] - [-SecurityGroupName ] [-LoadBalancerName ] [-BackendPort ] [-Location ] - [-EdgeZone ] [-VmSize ] [-UpgradePolicyMode ] [-AllocationMethod ] - [-VnetAddressPrefix ] [-SubnetAddressPrefix ] [-FrontendPoolName ] - [-BackendPoolName ] [-SystemAssignedIdentity] [-UserAssignedIdentity ] [-EnableUltraSSD] + [-DisableIntegrityMonitoring] [-ImageName ] -Credential [-InstanceCount ] + [-VirtualNetworkName ] [-SubnetName ] [-PublicIpAddressName ] + [-DomainNameLabel ] [-SecurityGroupName ] [-LoadBalancerName ] + [-BackendPort ] [-Location ] [-EdgeZone ] [-VmSize ] + [-UpgradePolicyMode ] [-AllocationMethod ] [-VnetAddressPrefix ] + [-SubnetAddressPrefix ] [-FrontendPoolName ] [-BackendPoolName ] + [-SystemAssignedIdentity] [-UserAssignedIdentity ] [-EnableUltraSSD] [-Zone ] [-NatBackendPort ] [-DataDiskSizeInGb ] [-ProximityPlacementGroupId ] [-HostGroupId ] [-Priority ] [-EvictionPolicy ] [-MaxPrice ] [-ScaleInPolicy ] @@ -358,6 +359,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -DisableIntegrityMonitoring +This flag disables the default behavior to install the Guest Attestation extension to the virtual machine scale set and its vm instances if: 1) SecurityType is TrustedLaunch, 2) SecureBootEnabled on the SecurityProfile is true, 3) VTpmEnabled on the SecurityProfile is true. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + ### -DomainNameLabel The domain name label for the public Fully-Qualified domain name (FQDN) for this Scale Set. This is the first component of the domain name that is automatically assigned to the Scale Set. Automatically assigned Domain names use the form (..cloudapp.azure.com). If no value is supplied, the default domain name label will be the concatenation of and . @@ -479,6 +495,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ImageReferenceId +Specified the shared gallery image unique id for vmss deployment. This can be fetched from shared gallery image GET call. + +```yaml +Type: System.String +Parameter Sets: SimpleParameterSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -InstanceCount The number of VM images in the Scale Set. If no value is provided, 2 instances will be created. @@ -689,21 +720,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ImageReferenceId -Specified the shared gallery image unique id for vmss deployment. This can be fetched from shared gallery image GET call. - -```yaml -Type: System.String -Parameter Sets: SimpleParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -SinglePlacementGroup Use this to create the Scale set in a single placement group, default is multiple groups @@ -926,20 +942,6 @@ Default value: None Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` - -### -DisableIntegrityMonitoring -This flag disables the default behavior to install the Guest Attestation extension to the virtual machine scale set and its vm instances if: 1) SecurityType is TrustedLaunch, 2) SecureBootEnabled on the SecurityProfile is true, 3) VTpmEnabled on the SecurityProfile is true. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: DefaultParameter -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Compute/Compute/help/New-AzVmssConfig.md b/src/Compute/Compute/help/New-AzVmssConfig.md index 856e7f7ab237..3d16f5925321 100644 --- a/src/Compute/Compute/help/New-AzVmssConfig.md +++ b/src/Compute/Compute/help/New-AzVmssConfig.md @@ -85,6 +85,8 @@ uses the VMSS configuration object created in the first command. Creates a VMSS configuration object. (autogenerated) + + ```powershell New-AzVmssConfig -Location -Overprovision $false -SkuCapacity 2 -SkuName 'Standard_A0' -Tag @{key0="value0";key1=$null;key2="value2"} -UpgradePolicyMode Automatic; ``` diff --git a/src/Compute/Compute/help/New-AzVmssGalleryApplication.md b/src/Compute/Compute/help/New-AzVmssGalleryApplication.md index 4ced72c3a555..4e17de69169f 100644 --- a/src/Compute/Compute/help/New-AzVmssGalleryApplication.md +++ b/src/Compute/Compute/help/New-AzVmssGalleryApplication.md @@ -1,7 +1,7 @@ --- external help file: Microsoft.Azure.PowerShell.Cmdlets.Compute.dll-Help.xml Module Name: Az.Compute -online version:https://docs.microsoft.com/powershell/module/az.compute/new-azvmssgalleryapplication +online version: https://docs.microsoft.com/powershell/module/az.compute/new-azvmssgalleryapplication schema: 2.0.0 --- @@ -14,7 +14,7 @@ Create a local PSVMGalleryApplication object. ``` New-AzVmssGalleryApplication -PackageReferenceId [-ConfigReferenceId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -78,6 +78,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Compute/Compute/help/Remove-AzDiskAccess.md b/src/Compute/Compute/help/Remove-AzDiskAccess.md index 1c6307fef2b9..9afb23acc70f 100644 --- a/src/Compute/Compute/help/Remove-AzDiskAccess.md +++ b/src/Compute/Compute/help/Remove-AzDiskAccess.md @@ -59,7 +59,7 @@ This command removes the disk access by InputObject ### Example 4: Remove Disk Access by piping Input Object ```powershell -Get-AzDiskAccess -ResourceGroupName "ResourceGroup01" -Name "DiskAccess01" | Remove-AzDiskAccess +Get-AzDiskAccess -ResourceGroupName "ResourceGroup01" -Name "DiskAccess01" | Remove-AzDiskAccess ``` This command removes the disk access by piping the InputObject diff --git a/src/Compute/Compute/help/Remove-AzGalleryApplication.md b/src/Compute/Compute/help/Remove-AzGalleryApplication.md index dcb6fcbedf05..9156597eb0d3 100644 --- a/src/Compute/Compute/help/Remove-AzGalleryApplication.md +++ b/src/Compute/Compute/help/Remove-AzGalleryApplication.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.Compute-help.xml Module Name: Az.Compute online version: https://docs.microsoft.com/powershell/module/az.compute/remove-azgalleryapplication schema: 2.0.0 @@ -15,14 +15,14 @@ Delete a gallery Application. ### Delete (Default) ``` Remove-AzGalleryApplication -GalleryName -Name -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzGalleryApplication -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] + [-PassThru] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -30,10 +30,9 @@ Delete a gallery Application. ## EXAMPLES -### Example 1: Remove a Gallery Application +### Example 1: Remove a Gallery Application ```powershell Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -Name $name - ``` Delete a gallery application. @@ -228,7 +227,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT ``: Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. @@ -245,4 +244,3 @@ INPUTOBJECT ``: Identity Parameter - `[VMScaleSetName ]`: The name of the VM scale set. ## RELATED LINKS - diff --git a/src/Compute/Compute/help/Remove-AzGalleryApplicationVersion.md b/src/Compute/Compute/help/Remove-AzGalleryApplicationVersion.md index 9bee25619f97..5bbe09f9eca3 100644 --- a/src/Compute/Compute/help/Remove-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute/help/Remove-AzGalleryApplicationVersion.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.Compute-help.xml Module Name: Az.Compute online version: https://docs.microsoft.com/powershell/module/az.compute/remove-azgalleryapplicationversion schema: 2.0.0 @@ -16,13 +16,13 @@ Delete a gallery Application Version. ``` Remove-AzGalleryApplicationVersion -GalleryApplicationName -GalleryName -Name -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] + [-PassThru] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzGalleryApplicationVersion -InputObject [-DefaultProfile ] [-AsJob] - [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -30,9 +30,9 @@ Delete a gallery Application Version. ## EXAMPLES -### Example 1: Remove a Gallery Application Version +### Example 1: Remove a Gallery Application Version ```powershell -Remove-AzGalleryApplicationVersion -ResourceGroupName $rgNmae -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -Name $name +Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -Name $name ``` Delete a gallery application version. @@ -242,7 +242,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT ``: Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. @@ -259,4 +259,3 @@ INPUTOBJECT ``: Identity Parameter - `[VMScaleSetName ]`: The name of the VM scale set. ## RELATED LINKS - diff --git a/src/Compute/Compute/help/Remove-AzGalleryImageVersion.md b/src/Compute/Compute/help/Remove-AzGalleryImageVersion.md index 006b7831bf6d..8a9f626c0b1a 100644 --- a/src/Compute/Compute/help/Remove-AzGalleryImageVersion.md +++ b/src/Compute/Compute/help/Remove-AzGalleryImageVersion.md @@ -96,7 +96,7 @@ The name of the gallery image definition. ```yaml Type: System.String Parameter Sets: DefaultParameter -Aliases: +Aliases: GalleryImageName Required: True Position: 2 diff --git a/src/Compute/Compute/help/Remove-AzProximityPlacementGroup.md b/src/Compute/Compute/help/Remove-AzProximityPlacementGroup.md index dc1c3e6301ee..53e0db98d1ad 100644 --- a/src/Compute/Compute/help/Remove-AzProximityPlacementGroup.md +++ b/src/Compute/Compute/help/Remove-AzProximityPlacementGroup.md @@ -47,6 +47,8 @@ This command removes the given proximity placement group. This command removes the given proximity placement group. (autogenerated) + + ```powershell Remove-AzProximityPlacementGroup -Name 'AgentPool01' -ResourceGroupName myresourcegroup ``` diff --git a/src/Compute/Compute/help/Remove-AzRestorePoint.md b/src/Compute/Compute/help/Remove-AzRestorePoint.md index 5cd53f632005..6252dc9519bc 100644 --- a/src/Compute/Compute/help/Remove-AzRestorePoint.md +++ b/src/Compute/Compute/help/Remove-AzRestorePoint.md @@ -35,7 +35,7 @@ Use this to Remove a Restore Point The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: IAzureContextContainer +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer Parameter Sets: (All) Aliases: AzContext, AzureRmContext, AzureCredential @@ -50,7 +50,7 @@ Accept wildcard characters: False Resource Name ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: RestorePointName @@ -65,7 +65,7 @@ Accept wildcard characters: False Resource Group Name ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -80,7 +80,7 @@ Accept wildcard characters: False Restore Point Collection Name ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -95,7 +95,7 @@ Accept wildcard characters: False Prompts you for confirmation before running the cmdlet. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: cf @@ -111,7 +111,7 @@ Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: wi diff --git a/src/Compute/Compute/help/Remove-AzRestorePointCollection.md b/src/Compute/Compute/help/Remove-AzRestorePointCollection.md index dd098b3d5b9f..8ceb5c16e899 100644 --- a/src/Compute/Compute/help/Remove-AzRestorePointCollection.md +++ b/src/Compute/Compute/help/Remove-AzRestorePointCollection.md @@ -35,7 +35,7 @@ Use this to remove Restore Point Collection The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: IAzureContextContainer +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer Parameter Sets: (All) Aliases: AzContext, AzureRmContext, AzureCredential @@ -50,7 +50,7 @@ Accept wildcard characters: False Resource Name ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: RestorePointCollectionName @@ -65,7 +65,7 @@ Accept wildcard characters: False Resource Group Name ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -80,7 +80,7 @@ Accept wildcard characters: False Prompts you for confirmation before running the cmdlet. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: cf @@ -96,7 +96,7 @@ Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: wi diff --git a/src/Compute/Compute/help/Remove-AzSshKey.md b/src/Compute/Compute/help/Remove-AzSshKey.md index 5cc068ab76c0..0682b9d39eab 100644 --- a/src/Compute/Compute/help/Remove-AzSshKey.md +++ b/src/Compute/Compute/help/Remove-AzSshKey.md @@ -14,19 +14,19 @@ Delete a SSH Public Key resource. ### DefaultParameterSet (Default) ``` -Remove-AzSshKey -ResourceGroupName -Name [-DefaultProfile ] - [] +Remove-AzSshKey -ResourceGroupName -Name [-DefaultProfile ] [-WhatIf] + [-Confirm] [] ``` ### ResourceIDParameterSet ``` -Remove-AzSshKey [-ResourceId] [-AsJob] [-DefaultProfile ] [-WhatIf] - [-Confirm] [] +Remove-AzSshKey -ResourceId [-DefaultProfile ] [-WhatIf] [-Confirm] + [] ``` ### InputObjectParameterSet ``` -Remove-AzSshKey [-InputObject] [-AsJob] [-DefaultProfile ] [-WhatIf] +Remove-AzSshKey -InputObject [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` @@ -68,7 +68,7 @@ Parameter Sets: InputObjectParameterSet Aliases: SshKey Required: True -Position: 0 +Position: Named Default value: None Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False @@ -79,7 +79,7 @@ Specifies the name of the Ssh Public Key resource to get. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: DefaultParameterSet Aliases: sshkeyName Required: True @@ -94,7 +94,7 @@ Specifies the name of a resource group. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: DefaultParameterSet Aliases: Required: True @@ -113,12 +113,42 @@ Parameter Sets: ResourceIDParameterSet Aliases: Required: True -Position: 0 +Position: Named Default value: None Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Compute/Compute/help/Remove-AzVMAccessExtension.md b/src/Compute/Compute/help/Remove-AzVMAccessExtension.md index 41ac85435735..dd052a556644 100644 --- a/src/Compute/Compute/help/Remove-AzVMAccessExtension.md +++ b/src/Compute/Compute/help/Remove-AzVMAccessExtension.md @@ -28,6 +28,8 @@ The **Remove-AzVMAccessExtension** cmdlet removes the Virtual Machine Access (VM Removes the VMAccess extension from a virtual machine. (autogenerated) + + ```powershell Remove-AzVMAccessExtension -Name 'AgentPool01' -ResourceGroupName myresourcegroup -VMName 'VM01' ``` diff --git a/src/Compute/Compute/help/Remove-AzVMCustomScriptExtension.md b/src/Compute/Compute/help/Remove-AzVMCustomScriptExtension.md index 4ad2c026baaf..95e379592185 100644 --- a/src/Compute/Compute/help/Remove-AzVMCustomScriptExtension.md +++ b/src/Compute/Compute/help/Remove-AzVMCustomScriptExtension.md @@ -28,6 +28,8 @@ The **Remove-AzVMCustomScriptExtension** cmdlet removes a custom script Virtual Removes a custom script extension from a virtual machine. (autogenerated) + + ```powershell Remove-AzVMCustomScriptExtension -Name 'AgentPool01' -ResourceGroupName myresourcegroup -VMName 'VM01' ``` diff --git a/src/Compute/Compute/help/Remove-AzVMRunCommand.md b/src/Compute/Compute/help/Remove-AzVMRunCommand.md index 811e498e5d28..a9ed49c61a6f 100644 --- a/src/Compute/Compute/help/Remove-AzVMRunCommand.md +++ b/src/Compute/Compute/help/Remove-AzVMRunCommand.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.Compute-help.xml Module Name: Az.Compute online version: https://docs.microsoft.com/powershell/module/az.compute/remove-azvmruncommand schema: 2.0.0 @@ -14,15 +14,15 @@ The operation to delete the run command. ### Delete (Default) ``` -Remove-AzVMRunCommand -ResourceGroupName -RunCommandName -VMName - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] +Remove-AzVMRunCommand -ResourceGroupName -RunCommandName [-SubscriptionId ] + -VMName [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzVMRunCommand -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] + [-PassThru] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -33,7 +33,6 @@ The operation to delete the run command. ### Example 1: Remove Run Command ```powershell Remove-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand" - ``` Remove a Run Command by its Name @@ -228,7 +227,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT ``: Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. @@ -245,4 +244,3 @@ INPUTOBJECT ``: Identity Parameter - `[VMScaleSetName ]`: The name of the VM scale set. ## RELATED LINKS - diff --git a/src/Compute/Compute/help/Remove-AzVmGalleryApplication.md b/src/Compute/Compute/help/Remove-AzVmGalleryApplication.md index 1a7879696c8e..aee560efb8ef 100644 --- a/src/Compute/Compute/help/Remove-AzVmGalleryApplication.md +++ b/src/Compute/Compute/help/Remove-AzVmGalleryApplication.md @@ -1,7 +1,7 @@ --- external help file: Microsoft.Azure.PowerShell.Cmdlets.Compute.dll-Help.xml Module Name: Az.Compute -online version:https://docs.microsoft.com/powershell/module/az.compute/remove-azvmgalleryapplication +online version: https://docs.microsoft.com/powershell/module/az.compute/remove-azvmgalleryapplication schema: 2.0.0 --- @@ -14,7 +14,7 @@ Remove a VMGalleryApplication object from the PSVirtualMachine object. ``` Remove-AzVmGalleryApplication -VM -GalleryApplicationsReferenceId - [-DefaultProfile ] [] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -75,6 +75,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Compute/Compute/help/Remove-AzVmssGalleryApplication.md b/src/Compute/Compute/help/Remove-AzVmssGalleryApplication.md index 4ae1d7397b39..31f2481bf4bc 100644 --- a/src/Compute/Compute/help/Remove-AzVmssGalleryApplication.md +++ b/src/Compute/Compute/help/Remove-AzVmssGalleryApplication.md @@ -1,7 +1,7 @@ --- external help file: Microsoft.Azure.PowerShell.Cmdlets.Compute.dll-Help.xml Module Name: Az.Compute -online version:https://docs.microsoft.com/powershell/module/az.compute/remove-azvmssgalleryapplication +online version: https://docs.microsoft.com/powershell/module/az.compute/remove-azvmssgalleryapplication schema: 2.0.0 --- @@ -14,7 +14,8 @@ Remove a VMGalleryApplication object from the PSVirtualMachineScaleSetVMProfile ``` Remove-AzVmssGalleryApplication -VirtualMachineScaleSetVM - -GalleryApplicationsReferenceId [-DefaultProfile ] [] + -GalleryApplicationsReferenceId [-DefaultProfile ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -75,6 +76,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Compute/Compute/help/Remove-AzVmssRunCommand.md b/src/Compute/Compute/help/Remove-AzVmssRunCommand.md index c2937eae2f17..250b675d3ff0 100644 --- a/src/Compute/Compute/help/Remove-AzVmssRunCommand.md +++ b/src/Compute/Compute/help/Remove-AzVmssRunCommand.md @@ -35,7 +35,7 @@ Remove Run Command from Vmss Run cmdlet in the background ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: @@ -50,7 +50,7 @@ Accept wildcard characters: False The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: IAzureContextContainer +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer Parameter Sets: (All) Aliases: AzContext, AzureRmContext, AzureCredential @@ -65,7 +65,7 @@ Accept wildcard characters: False Resource Group Name ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -80,7 +80,7 @@ Accept wildcard characters: False Run Command Name ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: Name @@ -95,7 +95,7 @@ Accept wildcard characters: False VMScaleSet Name ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -110,7 +110,7 @@ Accept wildcard characters: False Prompts you for confirmation before running the cmdlet. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: cf @@ -126,7 +126,7 @@ Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: wi diff --git a/src/Compute/Compute/help/Remove-AzVmssVMRunCommand.md b/src/Compute/Compute/help/Remove-AzVmssVMRunCommand.md index 8b5c13d9b20c..225b173834ed 100644 --- a/src/Compute/Compute/help/Remove-AzVmssVMRunCommand.md +++ b/src/Compute/Compute/help/Remove-AzVmssVMRunCommand.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.Compute-help.xml Module Name: Az.Compute online version: https://docs.microsoft.com/powershell/module/az.compute/remove-azvmssvmruncommand schema: 2.0.0 @@ -15,14 +15,14 @@ The operation to delete the VMSS VM run command. ### Delete (Default) ``` Remove-AzVmssVMRunCommand -InstanceId -ResourceGroupName -RunCommandName - -VMScaleSetName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] + [-SubscriptionId ] -VMScaleSetName [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzVmssVMRunCommand -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] + [-PassThru] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -33,7 +33,6 @@ The operation to delete the VMSS VM run command. ### Example 1: Remove VMSS VM RunCommand ```powershell Remove-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname - ``` Remove VMSS VM RunCommand @@ -243,7 +242,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT ``: Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. @@ -260,4 +259,3 @@ INPUTOBJECT ``: Identity Parameter - `[VMScaleSetName ]`: The name of the VM scale set. ## RELATED LINKS - diff --git a/src/Compute/Compute/help/Save-AzVMImage.md b/src/Compute/Compute/help/Save-AzVMImage.md index decfb81988bb..159b8cccfa50 100644 --- a/src/Compute/Compute/help/Save-AzVMImage.md +++ b/src/Compute/Compute/help/Save-AzVMImage.md @@ -49,6 +49,8 @@ The **Output** property returns a JSON template. Saves a virtual machine as a VMImage. (autogenerated) + + ```powershell Save-AzVMImage -DestinationContainerName 'VMContainer01' -Name 'VirtualMachine07' -Path '/home/admin/.ssh/authorized_keys' -ResourceGroupName 'ResourceGroup11' -VHDNamePrefix 'VM07' ``` diff --git a/src/Compute/Compute/help/Set-AzDiskSecurityProfile.md b/src/Compute/Compute/help/Set-AzDiskSecurityProfile.md index 567cbf41ba7f..6558cb6e9446 100644 --- a/src/Compute/Compute/help/Set-AzDiskSecurityProfile.md +++ b/src/Compute/Compute/help/Set-AzDiskSecurityProfile.md @@ -13,8 +13,8 @@ Set SecurityProfile on managed disk ## SYNTAX ``` -Set-AzDiskSecurityProfile [-Disk] [-SecurityType ] [-DefaultProfile ] - [] +Set-AzDiskSecurityProfile [-Disk] -SecurityType [-DefaultProfile ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -40,7 +40,7 @@ Customers can set the SecurityType of managed Disks. The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: IAzureContextContainer +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer Parameter Sets: (All) Aliases: AzContext, AzureRmContext, AzureCredential @@ -55,7 +55,7 @@ Accept wildcard characters: False Disk Security Profile ```yaml -Type: PSDisk +Type: Microsoft.Azure.Commands.Compute.Automation.Models.PSDisk Parameter Sets: (All) Aliases: DiskSecurityProfile @@ -70,17 +70,47 @@ Accept wildcard characters: False Security Type of Disk ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Compute/Compute/help/Set-AzVMAEMExtension.md b/src/Compute/Compute/help/Set-AzVMAEMExtension.md index db1f25be05a3..a17fe0db5987 100644 --- a/src/Compute/Compute/help/Set-AzVMAEMExtension.md +++ b/src/Compute/Compute/help/Set-AzVMAEMExtension.md @@ -16,8 +16,8 @@ Enables support for monitoring for SAP systems. ``` Set-AzVMAEMExtension [-ResourceGroupName] [-VMName] [-EnableWAD] [[-WADStorageAccountName] ] [[-OSType] ] [-SkipStorage] [-NoWait] - [-SetAccessToIndividualResources] [-InstallNewExtension] [-DefaultProfile ] - [] + [-SetAccessToIndividualResources] [-InstallNewExtension] [[-ProxyURI] ] [-DebugExtension] + [-DefaultProfile ] [] ``` ## DESCRIPTION @@ -36,6 +36,21 @@ The command specifies the storage account named stdstorage. ## PARAMETERS +### -DebugExtension +Enable debug mode for the VM Extension. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: 8 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -DefaultProfile The credentials, account, tenant, and subscription used for communication with azure. @@ -113,6 +128,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProxyURI +Configures the proxy URI that should be used by the VM Extension for SAP. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 7 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Specifies the name of the resource group of the virtual machine that this cmdlet modifies. diff --git a/src/Compute/Compute/help/Set-AzVMAccessExtension.md b/src/Compute/Compute/help/Set-AzVMAccessExtension.md index 51030a22eaba..ec2c4897d4db 100644 --- a/src/Compute/Compute/help/Set-AzVMAccessExtension.md +++ b/src/Compute/Compute/help/Set-AzVMAccessExtension.md @@ -38,6 +38,8 @@ The command specifies the name and type handler version for VMAccess. Adds the VMAccess extension to a virtual machine. (autogenerated) + + ```powershell Set-AzVMAccessExtension -Credential -Location 'Central US' -Name 'ContosoTest' -ResourceGroupName 'ResourceGroup11' -TypeHandlerVersion '2.4' -VMName 'VirtualMachine07' ``` diff --git a/src/Compute/Compute/help/Set-AzVMCustomScriptExtension.md b/src/Compute/Compute/help/Set-AzVMCustomScriptExtension.md index 5db3ac083a98..c2ede7954128 100644 --- a/src/Compute/Compute/help/Set-AzVMCustomScriptExtension.md +++ b/src/Compute/Compute/help/Set-AzVMCustomScriptExtension.md @@ -100,6 +100,8 @@ The script file is contososcript.exe. Adds a custom script extension to a virtual machine. (autogenerated) + + ```powershell Set-AzVMCustomScriptExtension -Argument -ContainerName 'Scripts' -DefaultProfile -FileName 'ContosoScript.exe' -Location 'Central US' -Name 'ContosoTest' -ResourceGroupName 'ResourceGroup11' -Run 'myScript.ps1' -SecureExecution -StorageAccountKey -StorageAccountName 'Contoso' -TypeHandlerVersion '1.1' -VMName 'VirtualMachine07' ``` diff --git a/src/Compute/Compute/help/Set-AzVMDataDisk.md b/src/Compute/Compute/help/Set-AzVMDataDisk.md index 44e73544e6ac..5d537c75615c 100644 --- a/src/Compute/Compute/help/Set-AzVMDataDisk.md +++ b/src/Compute/Compute/help/Set-AzVMDataDisk.md @@ -49,6 +49,8 @@ A change to the cashing mode causes the virtual machine to restart. Modifies properties of a virtual machine data disk. (autogenerated) + + ```powershell Set-AzVMDataDisk -Caching None -Lun 1 -VM ``` diff --git a/src/Compute/Compute/help/Set-AzVMDiskEncryptionExtension.md b/src/Compute/Compute/help/Set-AzVMDiskEncryptionExtension.md index 62b84e90e882..bd17fb9279e4 100644 --- a/src/Compute/Compute/help/Set-AzVMDiskEncryptionExtension.md +++ b/src/Compute/Compute/help/Set-AzVMDiskEncryptionExtension.md @@ -48,12 +48,22 @@ Set-AzVMDiskEncryptionExtension [-ResourceGroupName] [-VMName] ### MigrateADEVersionParameterSet ``` -Set-AzVMDiskEncryptionExtension [-ResourceGroupName] [-VMName] [-Migrate] +Set-AzVMDiskEncryptionExtension [-ResourceGroupName] [-VMName] + [[-KeyEncryptionAlgorithm] ] [[-VolumeType] ] [[-SequenceVersion] ] + [[-TypeHandlerVersion] ] [[-Name] ] [[-Passphrase] ] [-Force] + [-DisableAutoUpgradeMinorVersion] [-SkipVmBackup] [-ExtensionType ] [-ExtensionPublisherName ] + [-EncryptFormatAll] [-Migrate] [-DefaultProfile ] [-WhatIf] [-Confirm] + [] ``` ### MigrateADEVersionRecoveryParameterSet ``` -Set-AzVMDiskEncryptionExtension [-ResourceGroupName] [-VMName] [-MigrationRecovery] +Set-AzVMDiskEncryptionExtension [-ResourceGroupName] [-VMName] + [[-KeyEncryptionAlgorithm] ] [[-VolumeType] ] [[-SequenceVersion] ] + [[-TypeHandlerVersion] ] [[-Name] ] [[-Passphrase] ] [-Force] + [-DisableAutoUpgradeMinorVersion] [-SkipVmBackup] [-ExtensionType ] [-ExtensionPublisherName ] + [-EncryptFormatAll] [-MigrationRecovery] [-DefaultProfile ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -333,7 +343,7 @@ Specifies the resource ID of the **KeyVault** to which the virtual machine encry ```yaml Type: System.String -Parameter Sets: AADClientSecretParameterSet, AADClientCertParameterSet, SinglePassParameterSet +Parameter Sets: SinglePassParameterSet, AADClientSecretParameterSet, AADClientCertParameterSet Aliases: Required: True @@ -348,7 +358,7 @@ Specifies the **KeyVault** URL to which the virtual machine encryption keys shou ```yaml Type: System.String -Parameter Sets: AADClientSecretParameterSet, AADClientCertParameterSet, SinglePassParameterSet +Parameter Sets: SinglePassParameterSet, AADClientSecretParameterSet, AADClientCertParameterSet Aliases: Required: True @@ -418,36 +428,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Migrate -Initiates migration of the VM to latest Azure Disk Encryption extension version (ADE without AAD credentials). - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: MigrateADEVersionParameterSet -Aliases: - -Required: true -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MigrationRecovery -Initiates migration recovery for failures during migration of ADE extension version with AAD to ADE extension version without AAD. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: MigrateADEVersionRecoveryParameterSet -Aliases: - -Required: true -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -KeyEncryptionAlgorithm Specifies the algorithm that is used to wrap and unwrap the key encryption key of the virtual machine. The default value is RSA-OAEP. @@ -471,7 +451,7 @@ This must be the full versioned URL. ```yaml Type: System.String -Parameter Sets: AADClientSecretParameterSet, AADClientCertParameterSet, SinglePassParameterSet +Parameter Sets: SinglePassParameterSet, AADClientSecretParameterSet, AADClientCertParameterSet Aliases: Required: False @@ -487,7 +467,7 @@ This must be a full versioned URL. ```yaml Type: System.String -Parameter Sets: AADClientSecretParameterSet, AADClientCertParameterSet, SinglePassParameterSet +Parameter Sets: SinglePassParameterSet, AADClientSecretParameterSet, AADClientCertParameterSet Aliases: Required: False @@ -497,6 +477,36 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -Migrate +Initiates migration of the VM to latest Azure Disk Encryption extension version (ADE without AAD credentials). + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: MigrateADEVersionParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -MigrationRecovery +Initiates migration recovery for failures during migration of ADE extension version with AAD to ADE extension version without AAD. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: MigrateADEVersionRecoveryParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + ### -Name Specifies the name of the Azure Resource Manager resource that represents the extension. If the *Name* parameter is omitted, the installed extension will be named AzureDiskEncryption on Windows virtual machines and AzureDiskEncryptionForLinux on Linux virtual machines. diff --git a/src/Compute/Compute/help/Set-AzVMOSDisk.md b/src/Compute/Compute/help/Set-AzVMOSDisk.md index b1f14ead1af5..93b526bfe974 100644 --- a/src/Compute/Compute/help/Set-AzVMOSDisk.md +++ b/src/Compute/Compute/help/Set-AzVMOSDisk.md @@ -212,7 +212,7 @@ Aliases: Required: False Position: Named Default value: None -Accept pipeline input: True (ByValue) +Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` diff --git a/src/Compute/Compute/help/Set-AzVMRunCommand.md b/src/Compute/Compute/help/Set-AzVMRunCommand.md index 3c5cc0c1948c..6c7ba3517d62 100644 --- a/src/Compute/Compute/help/Set-AzVMRunCommand.md +++ b/src/Compute/Compute/help/Set-AzVMRunCommand.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.Compute-help.xml Module Name: Az.Compute online version: https://docs.microsoft.com/powershell/module/az.compute/set-azvmruncommand schema: 2.0.0 @@ -13,12 +13,13 @@ The operation to create or update the run command. ## SYNTAX ``` -Set-AzVMRunCommand -ResourceGroupName -RunCommandName -VMName -Location - [-SubscriptionId ] [-AsyncExecution] [-ErrorBlobUri ] [-OutputBlobUri ] - [-Parameter ] [-ProtectedParameter ] - [-RunAsPassword ] [-RunAsUser ] [-SourceCommandId ] [-SourceScript ] - [-SourceScriptUri ] [-Tag ] [-TimeoutInSecond ] [-DefaultProfile ] - [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +Set-AzVMRunCommand -ResourceGroupName -RunCommandName -VMName + [-SubscriptionId ] -Location [-AsyncExecution] [-ErrorBlobUri ] + [-OutputBlobUri ] [-Parameter ] + [-ProtectedParameter ] [-RunAsPassword ] [-RunAsUser ] + [-SourceCommandId ] [-SourceScript ] [-SourceScriptUri ] [-Tag ] + [-TimeoutInSecond ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -28,7 +29,7 @@ The operation to create or update the run command. ### Example 1: Simple Example ```powershell -Set-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName 'firstruncommand' +Set-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName 'firstruncommand' ``` ```output @@ -394,13 +395,12 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -PARAMETER : The parameters used by the script. +`PARAMETER `: The parameters used by the script. - `Name `: The run command parameter name. - `Value `: The run command parameter value. -PROTECTEDPARAMETER : The parameters used by the script. +`PROTECTEDPARAMETER `: The parameters used by the script. - `Name `: The run command parameter name. - `Value `: The run command parameter value. ## RELATED LINKS - diff --git a/src/Compute/Compute/help/Set-AzVMSecurityProfile.md b/src/Compute/Compute/help/Set-AzVMSecurityProfile.md index d648efadfbe1..6381c8c6ea07 100644 --- a/src/Compute/Compute/help/Set-AzVMSecurityProfile.md +++ b/src/Compute/Compute/help/Set-AzVMSecurityProfile.md @@ -13,7 +13,7 @@ Sets the SecurityType enum for Virtual Machines. ## SYNTAX ``` -Set-AzVMSecurityProfile [-VM] [-SecurityType ] +Set-AzVMSecurityProfile [-VM] [-SecurityType ] [-DefaultProfile ] [] ``` @@ -38,7 +38,7 @@ The second command sets the SecurityType enum to "TrustedLaunch". Trusted launch The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: IAzureContextContainer +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer Parameter Sets: (All) Aliases: AzContext, AzureRmContext, AzureCredential @@ -53,10 +53,9 @@ Accept wildcard characters: False Enum that represents the security type (ex: Trusted Launch) ```yaml -Type: SecurityTypes +Type: System.String Parameter Sets: (All) Aliases: -Accepted values: TrustedLaunch Required: False Position: Named @@ -69,7 +68,7 @@ Accept wildcard characters: False The virtual machine profile. ```yaml -Type: PSVirtualMachine +Type: Microsoft.Azure.Commands.Compute.Models.PSVirtualMachine Parameter Sets: (All) Aliases: VMProfile diff --git a/src/Compute/Compute/help/Set-AzVMUefi.md b/src/Compute/Compute/help/Set-AzVMUefi.md index 1a930ebea1ab..38a9420226a6 100644 --- a/src/Compute/Compute/help/Set-AzVMUefi.md +++ b/src/Compute/Compute/help/Set-AzVMUefi.md @@ -40,7 +40,7 @@ A change to the cashing mode causes the virtual machine to restart. The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: IAzureContextContainer +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer Parameter Sets: (All) Aliases: AzContext, AzureRmContext, AzureCredential @@ -55,7 +55,7 @@ Accept wildcard characters: False Parameter to toggle secure boot on the VM ```yaml -Type: Boolean +Type: System.Boolean Parameter Sets: (All) Aliases: @@ -70,7 +70,7 @@ Accept wildcard characters: False Parameter to toggle vTPM on the VM ```yaml -Type: Boolean +Type: System.Boolean Parameter Sets: (All) Aliases: @@ -85,7 +85,7 @@ Accept wildcard characters: False The virtual machine profile. ```yaml -Type: PSVirtualMachine +Type: Microsoft.Azure.Commands.Compute.Models.PSVirtualMachine Parameter Sets: (All) Aliases: VMProfile diff --git a/src/Compute/Compute/help/Set-AzVmss.md b/src/Compute/Compute/help/Set-AzVmss.md index af4ebf0bb999..930f594c6646 100644 --- a/src/Compute/Compute/help/Set-AzVmss.md +++ b/src/Compute/Compute/help/Set-AzVmss.md @@ -56,6 +56,8 @@ This command reimages the VMSS named ContosoVMSS that belongs to the resource gr Sets specific actions on a specified VMSS. (autogenerated) + + ```powershell Set-AzVmss -ReimageAll -ResourceGroupName 'ContosoGroup' -VMScaleSetName 'ContosoVMSS' ``` diff --git a/src/Compute/Compute/help/Set-AzVmssOsProfile.md b/src/Compute/Compute/help/Set-AzVmssOsProfile.md index c16f0de9e187..9f2c79d496be 100644 --- a/src/Compute/Compute/help/Set-AzVmssOsProfile.md +++ b/src/Compute/Compute/help/Set-AzVmssOsProfile.md @@ -188,7 +188,6 @@ $vmss = New-AzVmss ` -VirtualMachineScaleSet $vmssConfig; ``` - ## PARAMETERS ### -AdditionalUnattendContent diff --git a/src/Compute/Compute/help/Set-AzVmssSecurityProfile.md b/src/Compute/Compute/help/Set-AzVmssSecurityProfile.md index f667b48ab9af..631878c34664 100644 --- a/src/Compute/Compute/help/Set-AzVmssSecurityProfile.md +++ b/src/Compute/Compute/help/Set-AzVmssSecurityProfile.md @@ -13,7 +13,7 @@ This cmdlet allows users to set the SecurityType enum for Virtual Machines scale ## SYNTAX ``` -Set-AzVmssSecurityProfile [-VirtualMachineScaleSet] [[-SecurityType] ] +Set-AzVmssSecurityProfile [-VirtualMachineScaleSet] [[-SecurityType] ] [-DefaultProfile ] [] ``` @@ -38,7 +38,7 @@ The second command sets the SecurityType enum to "TrustedLaunch" The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: IAzureContextContainer +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer Parameter Sets: (All) Aliases: AzContext, AzureRmContext, AzureCredential @@ -53,10 +53,9 @@ Accept wildcard characters: False Enum that represents the security type (ex: Trusted Launch) ```yaml -Type: SecurityTypes +Type: System.String Parameter Sets: (All) Aliases: -Accepted values: TrustedLaunch Required: False Position: 1 @@ -69,7 +68,7 @@ Accept wildcard characters: False The virtual machine scale set profile. ```yaml -Type: PSVirtualMachineScaleSet +Type: Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet Parameter Sets: (All) Aliases: diff --git a/src/Compute/Compute/help/Set-AzVmssStorageProfile.md b/src/Compute/Compute/help/Set-AzVmssStorageProfile.md index d04390a45693..dc82fd2befe4 100644 --- a/src/Compute/Compute/help/Set-AzVmssStorageProfile.md +++ b/src/Compute/Compute/help/Set-AzVmssStorageProfile.md @@ -20,7 +20,7 @@ Set-AzVmssStorageProfile [-VirtualMachineScaleSet] [[-OsDiskCreateOption] ] [[-OsDiskOsType] ] [[-Image] ] [[-VhdContainer] ] [-ImageReferenceId ] [-OsDiskWriteAccelerator] [-DiffDiskSetting ] [-DiffDiskPlacement ] [-ManagedDisk ] - [-DiskEncryptionSetId ] [-DataDisk ] [-ImageReferenceId ] + [-DiskEncryptionSetId ] [-DataDisk ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` @@ -81,7 +81,7 @@ Aliases: Required: False Position: Named Default value: None -Accept pipeline input: True (ByValue) +Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` @@ -313,21 +313,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ImageReferenceId -Specified the shared gallery image unique id for vmss deployment. This can be fetched from shared gallery image GET call. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -VhdContainer Specifies the container URLs that are used to store operating system disks for the VMSS. diff --git a/src/Compute/Compute/help/Set-AzVmssUefi.md b/src/Compute/Compute/help/Set-AzVmssUefi.md index a54275d3271e..76976cd6e136 100644 --- a/src/Compute/Compute/help/Set-AzVmssUefi.md +++ b/src/Compute/Compute/help/Set-AzVmssUefi.md @@ -40,7 +40,7 @@ A change to the cashing mode causes the virtual machine to restart. The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: IAzureContextContainer +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer Parameter Sets: (All) Aliases: AzContext, AzureRmContext, AzureCredential @@ -55,7 +55,7 @@ Accept wildcard characters: False Parameter to toggle secure boot on the VMs of the scale set ```yaml -Type: Boolean +Type: System.Boolean Parameter Sets: (All) Aliases: @@ -70,7 +70,7 @@ Accept wildcard characters: False Parameter to toggle vTPM on the VMs of the scale set ```yaml -Type: Boolean +Type: System.Boolean Parameter Sets: (All) Aliases: @@ -85,7 +85,7 @@ Accept wildcard characters: False The virtual machine scale set profile. ```yaml -Type: PSVirtualMachineScaleSet +Type: Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet Parameter Sets: (All) Aliases: diff --git a/src/Compute/Compute/help/Set-AzVmssVM.md b/src/Compute/Compute/help/Set-AzVmssVM.md index a7a40e13968e..c6950d167a03 100644 --- a/src/Compute/Compute/help/Set-AzVmssVM.md +++ b/src/Compute/Compute/help/Set-AzVmssVM.md @@ -55,6 +55,8 @@ The **Set-AzVmssVM** cmdlet modifies the state of a Virtual Machine Scale Set (V Modifies the state of a VMSS instance. (autogenerated) + + ```powershell Set-AzVmssVM -InstanceId -Reimage -ResourceGroupName myresourcegroup -VMScaleSetName 'VMSS001' ``` @@ -64,6 +66,8 @@ Set-AzVmssVM -InstanceId -Reimage -ResourceGroupName myresourcegroup -V Modifies the state of a VMSS instance. (autogenerated) + + ```powershell Set-AzVmssVM -InstanceId -PerformMaintenance -ResourceGroupName myresourcegroup -VMScaleSetName 'VMSS001' ``` diff --git a/src/Compute/Compute/help/Set-AzVmssVMRunCommand.md b/src/Compute/Compute/help/Set-AzVmssVMRunCommand.md index 2d665570b496..5ceb99972de9 100644 --- a/src/Compute/Compute/help/Set-AzVmssVMRunCommand.md +++ b/src/Compute/Compute/help/Set-AzVmssVMRunCommand.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.Compute-help.xml Module Name: Az.Compute online version: https://docs.microsoft.com/powershell/module/az.compute/set-azvmssvmruncommand schema: 2.0.0 @@ -14,11 +14,11 @@ The operation to create or update the VMSS VM run command. ``` Set-AzVmssVMRunCommand -InstanceId -ResourceGroupName -RunCommandName - -VMScaleSetName -Location [-SubscriptionId ] [-AsyncExecution] + -VMScaleSetName [-SubscriptionId ] -Location [-AsyncExecution] [-ErrorBlobUri ] [-OutputBlobUri ] [-Parameter ] [-ProtectedParameter ] [-RunAsPassword ] [-RunAsUser ] [-SourceCommandId ] [-SourceScript ] [-SourceScriptUri ] [-Tag ] - [-TimeoutInSecond ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [-TimeoutInSecond ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` @@ -410,13 +410,12 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -PARAMETER : The parameters used by the script. +`PARAMETER `: The parameters used by the script. - `Name `: The run command parameter name. - `Value `: The run command parameter value. -PROTECTEDPARAMETER : The parameters used by the script. +`PROTECTEDPARAMETER `: The parameters used by the script. - `Name `: The run command parameter name. - `Value `: The run command parameter value. ## RELATED LINKS - diff --git a/src/Compute/Compute/help/Start-AzVmssRollingExtensionUpgrade.md b/src/Compute/Compute/help/Start-AzVmssRollingExtensionUpgrade.md index c23f36d3399c..9e8b1f409981 100644 --- a/src/Compute/Compute/help/Start-AzVmssRollingExtensionUpgrade.md +++ b/src/Compute/Compute/help/Start-AzVmssRollingExtensionUpgrade.md @@ -12,7 +12,7 @@ This cmdlet starts a rolling upgrade for all extensions on the given Virtual Mac ## SYNTAX -### DefaultParameter +### DefaultParameter (Default) ``` Start-AzVmssRollingExtensionUpgrade -ResourceGroupName -VMScaleSetName [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] diff --git a/src/Compute/Compute/help/Update-AzGallery.md b/src/Compute/Compute/help/Update-AzGallery.md index 6456f4580a7d..0df8eb7ec831 100644 --- a/src/Compute/Compute/help/Update-AzGallery.md +++ b/src/Compute/Compute/help/Update-AzGallery.md @@ -55,7 +55,6 @@ Update-AzGallery -ResourceGroupName $rgname -Name $galleryName -Permission Group Update a gallery to be shared and add two subscriptions it is to be shared with. - ## PARAMETERS ### -AsJob diff --git a/src/Compute/Compute/help/Update-AzGalleryApplication.md b/src/Compute/Compute/help/Update-AzGalleryApplication.md index 796c82dc3da7..b72a2bfeeb0f 100644 --- a/src/Compute/Compute/help/Update-AzGalleryApplication.md +++ b/src/Compute/Compute/help/Update-AzGalleryApplication.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.Compute-help.xml Module Name: Az.Compute online version: https://docs.microsoft.com/powershell/module/az.compute/update-azgalleryapplication schema: 2.0.0 @@ -16,13 +16,13 @@ Update a gallery Application Definition. ``` Update-AzGalleryApplication -GalleryName -Name -ResourceGroupName [-SubscriptionId ] [-Description ] [-Tag ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-Confirm] [-WhatIf] [] + [-NoWait] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityExpanded ``` Update-AzGalleryApplication -InputObject [-Description ] [-Tag ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -33,7 +33,6 @@ Update a gallery Application Definition. ### Example 1: Update a Gallery Application ```powershell Update-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -Name $name -Description "New Description" - ``` Updating a Gallery Application. @@ -235,7 +234,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplication +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication ## NOTES @@ -246,7 +245,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT ``: Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. @@ -263,4 +262,3 @@ INPUTOBJECT ``: Identity Parameter - `[VMScaleSetName ]`: The name of the VM scale set. ## RELATED LINKS - diff --git a/src/Compute/Compute/help/Update-AzGalleryApplicationVersion.md b/src/Compute/Compute/help/Update-AzGalleryApplicationVersion.md index dbd6acc98189..b8a4e31a6893 100644 --- a/src/Compute/Compute/help/Update-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute/help/Update-AzGalleryApplicationVersion.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.Compute-help.xml Module Name: Az.Compute online version: https://docs.microsoft.com/powershell/module/az.compute/update-azgalleryapplicationversion schema: 2.0.0 @@ -15,10 +15,10 @@ Update a gallery Application Version. ### UpdateExpanded (Default) ``` Update-AzGalleryApplicationVersion -GalleryApplicationName -GalleryName -Name - -ResourceGroupName -PackageFileLink [-SubscriptionId ] + -ResourceGroupName [-SubscriptionId ] -PackageFileLink [-DefaultConfigFileLink ] [-PublishingProfileEndOfLifeDate ] [-PublishingProfileExcludeFromLatest] [-ReplicaCount ] [-Tag ] - [-TargetRegion ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [-TargetRegion ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` @@ -27,7 +27,7 @@ Update-AzGalleryApplicationVersion -GalleryApplicationName -GalleryName Update-AzGalleryApplicationVersion -InputObject -PackageFileLink [-DefaultConfigFileLink ] [-PublishingProfileEndOfLifeDate ] [-PublishingProfileExcludeFromLatest] [-ReplicaCount ] [-Tag ] - [-TargetRegion ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [-TargetRegion ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` @@ -39,12 +39,12 @@ Update a gallery Application Version. ### Example 1: Update Replica Count of Gallery Application Version ```powershell $ctx = New-AzStorageContext -StorageAccountName $storAccName -$SASToken = New-AzStorageBlobSASToken -Context $ctx -Container $containerName -blob $blobName -Permission r +$SASToken = new-azstorageblobsastoken -Context $ctx -Container $containerName -blob $blobName -Permission r $storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName $blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context $SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context $SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + "?" +$SASToken -Update-AzGalleryApplicationVersion -ResourceGroupName $rgname -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -ReplicaCount 3 +Update-AzGalleryApplicationVersion -ResourceGroupName $rgname -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -ReplicaCount 3 ``` Updating a Gallery Application Version's replica count. @@ -294,7 +294,7 @@ This property is updatable. To construct, see NOTES section for TARGETREGION properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.ITargetRegion[] +Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ITargetRegion[] Parameter Sets: (All) Aliases: @@ -345,7 +345,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion ## NOTES @@ -356,7 +356,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT ``: Identity Parameter +`INPUTOBJECT `: Identity Parameter - `[CommandId ]`: The command id. - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. @@ -372,14 +372,15 @@ INPUTOBJECT ``: Identity Parameter - `[VMName ]`: The name of the virtual machine where the run command should be created or updated. - `[VMScaleSetName ]`: The name of the VM scale set. -TARGETREGION : The target regions where the Image Version is going to be replicated to. This property is updatable. +`TARGETREGION `: The target regions where the Image Version is going to be replicated to. This property is updatable. - `Name `: The name of the region. - `[EncryptionDataDiskImage ]`: A list of encryption specifications for data disk images. - `Lun `: This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. - `[DiskEncryptionSetId ]`: A relative URI containing the resource ID of the disk encryption set. - `[OSDiskImageDiskEncryptionSetId ]`: A relative URI containing the resource ID of the disk encryption set. - `[RegionalReplicaCount ]`: The number of replicas of the Image Version to be created per region. This property is updatable. + - `[SecurityProfileConfidentialVMEncryptionType ]`: confidential VM encryption types + - `[SecurityProfileSecureVMDiskEncryptionSetId ]`: secure VM disk encryption set id - `[StorageAccountType ]`: Specifies the storage account type to be used to store the image. This property is not updatable. ## RELATED LINKS - diff --git a/src/Compute/Compute/help/Update-AzGalleryImageVersion.md b/src/Compute/Compute/help/Update-AzGalleryImageVersion.md index 6f57aade779e..ca26ad019f4f 100644 --- a/src/Compute/Compute/help/Update-AzGalleryImageVersion.md +++ b/src/Compute/Compute/help/Update-AzGalleryImageVersion.md @@ -81,7 +81,6 @@ Update-AzGalleryImageVersion -ResourceGroupName $rgname -GalleryName $galleryNam Update a gallery image version's end-of-life date. The image version can still be used to create virtual machines after the end-of-life date. - ## PARAMETERS ### -AsJob @@ -120,7 +119,7 @@ The name of the gallery image definition. ```yaml Type: System.String Parameter Sets: DefaultParameter -Aliases: +Aliases: GalleryImageName Required: True Position: 2 diff --git a/src/Compute/Compute/help/Update-AzRestorePointCollection.md b/src/Compute/Compute/help/Update-AzRestorePointCollection.md index 7be3cdd83272..9de74a1ecbca 100644 --- a/src/Compute/Compute/help/Update-AzRestorePointCollection.md +++ b/src/Compute/Compute/help/Update-AzRestorePointCollection.md @@ -24,7 +24,7 @@ Update Restore Point Collection. Can only Update Tags ### Example 1 ```powershell -Update-AzRestorePointCollection -ResourceGroupName -Name [-Tag] -Confirm +Update-AzRestorePointCollection -ResourceGroupName -Name -Tag -Confirm ``` Add updated tags using -Tag parameter @@ -35,7 +35,7 @@ Add updated tags using -Tag parameter The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: IAzureContextContainer +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer Parameter Sets: (All) Aliases: AzContext, AzureRmContext, AzureCredential @@ -50,7 +50,7 @@ Accept wildcard characters: False Resource Name ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: RestorePointCollectionName @@ -65,7 +65,7 @@ Accept wildcard characters: False Resource Group Name ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -80,7 +80,7 @@ Accept wildcard characters: False A hashtable which represents resource tags. ```yaml -Type: Hashtable +Type: System.Collections.Hashtable Parameter Sets: (All) Aliases: @@ -95,7 +95,7 @@ Accept wildcard characters: False Prompts you for confirmation before running the cmdlet. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: cf @@ -111,7 +111,7 @@ Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: wi diff --git a/src/Compute/Compute/help/Update-AzSshKey.md b/src/Compute/Compute/help/Update-AzSshKey.md index 9eb476a71f39..c9019e3da677 100644 --- a/src/Compute/Compute/help/Update-AzSshKey.md +++ b/src/Compute/Compute/help/Update-AzSshKey.md @@ -15,19 +15,19 @@ Update a SSH Public Key resource. ### DefaultParameterSet (Default) ``` Update-AzSshKey -ResourceGroupName -Name -PublicKey - [-DefaultProfile ] [] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ### ResourceIDParameterSet ``` -Update-AzSshKey [-ResourceId] -PublicKey [-AsJob] [-DefaultProfile ] [-WhatIf] +Update-AzSshKey -ResourceId -PublicKey [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ### InputObjectParameterSet ``` -Update-AzSshKey[-InputObject] -PublicKey [-AsJob] [-DefaultProfile ] [-WhatIf] - [-Confirm] [] +Update-AzSshKey -InputObject -PublicKey + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -39,7 +39,6 @@ Update a SSH Public Key resource. ```powershell $SshKey1 = Get-AzSshKey -ResourceGroupName "testRG" -Name "sshKey1" Update-AzSshKey -ResourceGroupName "testRG" -Name "sshKey2" -PublicKey $SshKey1.publickey - ``` Updates the public key value of 'sshKey2' with public key value from 'sshKey1' @@ -70,7 +69,7 @@ Parameter Sets: InputObjectParameterSet Aliases: SshKey Required: True -Position: 0 +Position: Named Default value: None Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False @@ -81,7 +80,7 @@ Specifies the name of the Ssh Public Key resource to get. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: DefaultParameterSet Aliases: sshkeyName Required: True @@ -111,7 +110,7 @@ Specifies the name of a resource group. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: DefaultParameterSet Aliases: Required: True @@ -130,12 +129,42 @@ Parameter Sets: ResourceIDParameterSet Aliases: Required: True -Position: 0 +Position: Named Default value: None Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Compute/Compute/help/Update-AzVmssVM.md b/src/Compute/Compute/help/Update-AzVmssVM.md index 026a43639cd8..58a1d98a1d34 100644 --- a/src/Compute/Compute/help/Update-AzVmssVM.md +++ b/src/Compute/Compute/help/Update-AzVmssVM.md @@ -70,6 +70,8 @@ The final command updates the Vmss VM with added data disk. Updates the state of a Vmss VM. (autogenerated) + + ```powershell Update-AzVmssVM -InstanceId 0 -ProtectFromScaleIn $false -ProtectFromScaleSetAction $false -ResourceGroupName 'myrg' -VMScaleSetName 'myvmss' ``` diff --git a/tools/StaticAnalysis/Exceptions/Az.Compute/BreakingChangeIssues.csv b/tools/StaticAnalysis/Exceptions/Az.Compute/BreakingChangeIssues.csv index 37cb900f2665..dd26ece9aff2 100644 --- a/tools/StaticAnalysis/Exceptions/Az.Compute/BreakingChangeIssues.csv +++ b/tools/StaticAnalysis/Exceptions/Az.Compute/BreakingChangeIssues.csv @@ -1,2 +1,5 @@ "AssemblyFileName","ClassName","Target","Severity","ProblemId","Description","Remediation" -"Az.Compute","Microsoft.Azure.Commands.Compute.Automation.GetAzureRestorePoint","Get-AzRestorePoint","0","3000","The type of property 'ReplicationStatus' of type 'Microsoft.Azure.Management.Compute.Models.DiskRestorePointInstanceView' has changed from 'System.Object' to 'Microsoft.Azure.Management.Compute.Models.DiskRestorePointReplicationStatus'.","Change the type of property 'ReplicationStatus' back to 'System.Object'." \ No newline at end of file +"Az.Compute","Microsoft.Azure.Commands.Compute.Automation.GetAzureRestorePoint","Get-AzRestorePoint","0","3000","The type of property 'ReplicationStatus' of type 'Microsoft.Azure.Management.Compute.Models.DiskRestorePointInstanceView' has changed from 'System.Object' to 'Microsoft.Azure.Management.Compute.Models.DiskRestorePointReplicationStatus'.","Change the type of property 'ReplicationStatus' back to 'System.Object'." +"Az.Compute","New-AzGalleryApplicationVersion","New-AzGalleryApplicationVersion","0","1020","The cmdlet 'New-AzGalleryApplicationVersion' no longer has output type 'Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion'.","Make cmdlet 'New-AzGalleryApplicationVersion' return type 'Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion'." +"Az.Compute","Update-AzGalleryApplicationVersion","Update-AzGalleryApplicationVersion","0","1020","The cmdlet 'Update-AzGalleryApplicationVersion' no longer has output type 'Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion'.","Make cmdlet 'Update-AzGalleryApplicationVersion' return type 'Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion'." +"Az.Compute","Get-AzGalleryApplicationVersion","Get-AzGalleryApplicationVersion","0","1020","The cmdlet 'Get-AzGalleryApplicationVersion' no longer has output type 'Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion'.","Make cmdlet 'Get-AzGalleryApplicationVersion' return type 'Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IGalleryApplicationVersion'."