From 7e79df34ead29f4aaf730d743d3f69e9d2aabaaf Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 3 Jan 2023 17:59:42 +0000 Subject: [PATCH] CodeGen from PR 21571 in Azure/azure-rest-api-specs Merge 203fb5481802681bec08effd5bc99830ecc1de10 into 25bfafa4fc73bb7e876dd5ef00f19b9aa9ba628a --- ....ResourceManager.Compute.netstandard2.0.cs | 178 +++++++++++--- .../src/Generated/CloudServiceData.cs | 125 +--------- .../src/Generated/CloudServiceOSFamilyData.cs | 20 +- .../Generated/CloudServiceOSVersionData.cs | 31 +-- .../src/Generated/CloudServiceRoleData.cs | 13 +- .../Generated/CloudServiceRoleInstanceData.cs | 21 +- .../Models/AlternativeOption.Serialization.cs | 56 +++++ .../src/Generated/Models/AlternativeOption.cs | 32 +++ .../src/Generated/Models/AlternativeType.cs | 54 +++++ .../Models/CloudServiceData.Serialization.cs | 227 ++++-------------- .../CloudServiceExtension.Serialization.cs | 161 +------------ .../Generated/Models/CloudServiceExtension.cs | 121 +--------- ...erviceExtensionProperties.Serialization.cs | 179 ++++++++++++++ .../Models/CloudServiceExtensionProperties.cs | 139 +++++++++++ ...LoadBalancerConfiguration.Serialization.cs | 34 +-- .../CloudServiceLoadBalancerConfiguration.cs | 25 +- .../CloudServiceOSFamilyData.Serialization.cs | 54 +---- ...CloudServiceOSVersionData.Serialization.cs | 72 +----- .../CloudServiceProperties.Serialization.cs | 197 +++++++++++++++ .../Models/CloudServiceProperties.cs | 140 +++++++++++ .../CloudServiceRoleData.Serialization.cs | 31 +-- ...udServiceRoleInstanceData.Serialization.cs | 47 +--- ...loudServiceRoleProperties.Serialization.cs | 29 +++ .../Models/CloudServiceRoleProperties.cs | 28 +++ .../ImageDeprecationStatus.Serialization.cs | 78 ++++++ .../Models/ImageDeprecationStatus.cs | 38 +++ .../src/Generated/Models/ImageState.cs | 54 +++++ ...erConfigurationProperties.Serialization.cs | 48 ++++ .../LoadBalancerConfigurationProperties.cs | 38 +++ ...erFrontendIPConfiguration.Serialization.cs | 59 +---- .../LoadBalancerFrontendIPConfiguration.cs | 53 +--- ...IPConfigurationProperties.Serialization.cs | 73 ++++++ ...lancerFrontendIPConfigurationProperties.cs | 63 +++++ .../OSFamilyProperties.Serialization.cs | 52 ++++ .../Generated/Models/OSFamilyProperties.cs | 40 +++ ...SImageNotificationProfile.Serialization.cs | 56 +++++ .../Models/OSImageNotificationProfile.cs | 32 +++ ...OSProfileProvisioningData.Serialization.cs | 31 +++ .../Models/OSProfileProvisioningData.cs | 23 ++ .../OSVersionProperties.Serialization.cs | 69 ++++++ .../Generated/Models/OSVersionProperties.cs | 48 ++++ ...estorePointSourceMetadata.Serialization.cs | 8 +- .../Models/RestorePointSourceMetadata.cs | 6 +- .../RoleInstanceProperties.Serialization.cs | 45 ++++ .../Models/RoleInstanceProperties.cs | 41 ++++ .../RollingUpgradePolicy.Serialization.cs | 34 ++- .../Generated/Models/RollingUpgradePolicy.cs | 10 +- .../ScheduledEventsProfile.Serialization.cs | 20 +- .../Models/ScheduledEventsProfile.cs | 8 +- .../VirtualMachineImage.Serialization.cs | 18 +- .../Generated/Models/VirtualMachineImage.cs | 6 +- .../Generated/Models/VirtualMachinePatch.cs | 14 +- ...tualMachineReimageContent.Serialization.cs | 10 + .../Models/VirtualMachineReimageContent.cs | 4 + ...irtualMachineScaleSetData.Serialization.cs | 18 +- ...lMachineScaleSetOSProfile.Serialization.cs | 18 +- .../Models/VirtualMachineScaleSetOSProfile.cs | 6 +- ...ineScaleSetReimageContent.Serialization.cs | 10 + .../VirtualMachineScaleSetUpdateVmProfile.cs | 14 +- ...lMachineScaleSetVmProfile.Serialization.cs | 19 +- .../Models/VirtualMachineScaleSetVmProfile.cs | 33 +-- ...eScaleSetVmReimageContent.Serialization.cs | 10 + .../AvailabilitySetsRestOperations.cs | 2 +- ...CapacityReservationGroupsRestOperations.cs | 2 +- .../CapacityReservationsRestOperations.cs | 2 +- ...udServiceOperatingSystemsRestOperations.cs | 2 +- ...CloudServiceRoleInstancesRestOperations.cs | 2 +- .../CloudServiceRolesRestOperations.cs | 2 +- .../CloudServicesRestOperations.cs | 2 +- ...CloudServicesUpdateDomainRestOperations.cs | 2 +- .../DedicatedHostGroupsRestOperations.cs | 2 +- .../DedicatedHostsRestOperations.cs | 2 +- .../RestOperations/ImagesRestOperations.cs | 2 +- .../LogAnalyticsRestOperations.cs | 2 +- .../ProximityPlacementGroupsRestOperations.cs | 2 +- .../RestorePointCollectionsRestOperations.cs | 2 +- .../RestorePointsRestOperations.cs | 2 +- .../SshPublicKeysRestOperations.cs | 2 +- .../RestOperations/UsageRestOperations.cs | 2 +- ...ualMachineExtensionImagesRestOperations.cs | 2 +- .../VirtualMachineExtensionsRestOperations.cs | 2 +- ...tualMachineImagesEdgeZoneRestOperations.cs | 2 +- .../VirtualMachineImagesRestOperations.cs | 2 +- ...VirtualMachineRunCommandsRestOperations.cs | 2 +- ...MachineScaleSetExtensionsRestOperations.cs | 2 +- ...neScaleSetRollingUpgradesRestOperations.cs | 2 +- ...chineScaleSetVMExtensionsRestOperations.cs | 2 +- ...hineScaleSetVMRunCommandsRestOperations.cs | 2 +- ...VirtualMachineScaleSetVMsRestOperations.cs | 2 +- .../VirtualMachineScaleSetsRestOperations.cs | 2 +- .../VirtualMachineSizesRestOperations.cs | 2 +- .../VirtualMachinesRestOperations.cs | 6 +- .../src/Generated/VirtualMachineData.cs | 14 +- .../src/Generated/VirtualMachineResource.cs | 4 +- .../Generated/VirtualMachineScaleSetData.cs | 6 +- .../src/autorest.md | 2 +- 96 files changed, 2250 insertions(+), 1061 deletions(-) create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AlternativeOption.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AlternativeOption.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AlternativeType.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtensionProperties.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtensionProperties.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceProperties.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceProperties.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleProperties.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleProperties.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDeprecationStatus.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDeprecationStatus.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageState.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerConfigurationProperties.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerConfigurationProperties.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfigurationProperties.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfigurationProperties.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSFamilyProperties.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSFamilyProperties.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSImageNotificationProfile.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSImageNotificationProfile.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSProfileProvisioningData.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSProfileProvisioningData.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSVersionProperties.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSVersionProperties.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceProperties.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceProperties.cs diff --git a/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs b/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs index bf1e4712e5da..a416a587045c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs @@ -159,18 +159,8 @@ protected CloudServiceCollection() { } public partial class CloudServiceData : Azure.ResourceManager.Models.TrackedResourceData { public CloudServiceData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public bool? AllowModelOverride { get { throw null; } set { } } - public string Configuration { get { throw null; } set { } } - public System.Uri ConfigurationUri { get { throw null; } set { } } - public System.Collections.Generic.IList Extensions { get { throw null; } } - public Azure.ResourceManager.Compute.Models.CloudServiceNetworkProfile NetworkProfile { get { throw null; } set { } } - public System.Collections.Generic.IList OSSecrets { get { throw null; } } - public System.Uri PackageUri { get { throw null; } set { } } - public string ProvisioningState { get { throw null; } } - public System.Collections.Generic.IList Roles { get { throw null; } } - public bool? StartCloudService { get { throw null; } set { } } - public string UniqueId { get { throw null; } } - public Azure.ResourceManager.Compute.Models.CloudServiceUpgradeMode? UpgradeMode { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.CloudServiceProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IList Zones { get { throw null; } } } public partial class CloudServiceOSFamilyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -188,11 +178,9 @@ protected CloudServiceOSFamilyCollection() { } public partial class CloudServiceOSFamilyData : Azure.ResourceManager.Models.ResourceData { internal CloudServiceOSFamilyData() { } - public string Label { get { throw null; } } public Azure.Core.AzureLocation? Location { get { throw null; } } - public string OSFamilyName { get { throw null; } } + public Azure.ResourceManager.Compute.Models.OSFamilyProperties Properties { get { throw null; } } public string ResourceName { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Versions { get { throw null; } } } public partial class CloudServiceOSFamilyResource : Azure.ResourceManager.ArmResource { @@ -220,13 +208,8 @@ protected CloudServiceOSVersionCollection() { } public partial class CloudServiceOSVersionData : Azure.ResourceManager.Models.ResourceData { internal CloudServiceOSVersionData() { } - public string Family { get { throw null; } } - public string FamilyLabel { get { throw null; } } - public bool? IsActive { get { throw null; } } - public bool? IsDefault { get { throw null; } } - public string Label { get { throw null; } } public Azure.Core.AzureLocation? Location { get { throw null; } } - public string Version { get { throw null; } } + public Azure.ResourceManager.Compute.Models.OSVersionProperties Properties { get { throw null; } } } public partial class CloudServiceOSVersionResource : Azure.ResourceManager.ArmResource { @@ -300,9 +283,9 @@ protected CloudServiceRoleCollection() { } public partial class CloudServiceRoleData : Azure.ResourceManager.Models.ResourceData { internal CloudServiceRoleData() { } + public string CloudServiceRoleUniqueId { get { throw null; } } public Azure.Core.AzureLocation? Location { get { throw null; } } public Azure.ResourceManager.Compute.Models.CloudServiceRoleSku Sku { get { throw null; } } - public string UniqueId { get { throw null; } } } public partial class CloudServiceRoleInstanceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -320,9 +303,8 @@ protected CloudServiceRoleInstanceCollection() { } public partial class CloudServiceRoleInstanceData : Azure.ResourceManager.Models.ResourceData { internal CloudServiceRoleInstanceData() { } - public Azure.ResourceManager.Compute.Models.RoleInstanceView InstanceView { get { throw null; } } public Azure.Core.AzureLocation? Location { get { throw null; } } - public System.Collections.Generic.IReadOnlyList NetworkInterfaces { get { throw null; } } + public Azure.ResourceManager.Compute.Models.RoleInstanceProperties Properties { get { throw null; } } public Azure.ResourceManager.Compute.Models.InstanceSku Sku { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } } @@ -1694,7 +1676,7 @@ public VirtualMachineData(Azure.Core.AzureLocation location) : base (default(Azu public string ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier ProximityPlacementGroupId { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Resources { get { throw null; } } - public Azure.ResourceManager.Compute.Models.TerminateNotificationProfile ScheduledEventsTerminateNotificationProfile { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.ScheduledEventsProfile ScheduledEventsProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.SecurityProfile SecurityProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile StorageProfile { get { throw null; } set { } } public System.DateTimeOffset? TimeCreated { get { throw null; } } @@ -1940,6 +1922,7 @@ public partial class VirtualMachineScaleSetData : Azure.ResourceManager.Models.T public VirtualMachineScaleSetData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } public Azure.ResourceManager.Compute.Models.AdditionalCapabilities AdditionalCapabilities { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.AutomaticRepairsPolicy AutomaticRepairsPolicy { get { throw null; } set { } } + public bool? ConstrainedMaximumCapacity { get { throw null; } set { } } public bool? DoNotRunExtensionsOnOverprovisionedVms { get { throw null; } set { } } public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.Core.ResourceIdentifier HostGroupId { get { throw null; } set { } } @@ -2347,6 +2330,31 @@ public AdditionalUnattendContent() { } public static bool operator !=(Azure.ResourceManager.Compute.Models.AggregatedReplicationState left, Azure.ResourceManager.Compute.Models.AggregatedReplicationState right) { throw null; } public override string ToString() { throw null; } } + public partial class AlternativeOption + { + public AlternativeOption() { } + public Azure.ResourceManager.Compute.Models.AlternativeType? AlternativeType { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AlternativeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AlternativeType(string value) { throw null; } + public static Azure.ResourceManager.Compute.Models.AlternativeType None { get { throw null; } } + public static Azure.ResourceManager.Compute.Models.AlternativeType Offer { get { throw null; } } + public static Azure.ResourceManager.Compute.Models.AlternativeType Plan { get { throw null; } } + public bool Equals(Azure.ResourceManager.Compute.Models.AlternativeType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Compute.Models.AlternativeType left, Azure.ResourceManager.Compute.Models.AlternativeType right) { throw null; } + public static implicit operator Azure.ResourceManager.Compute.Models.AlternativeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Compute.Models.AlternativeType left, Azure.ResourceManager.Compute.Models.AlternativeType right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ArchitectureType : System.IEquatable { @@ -2513,10 +2521,15 @@ internal CapacityReservationUtilization() { } public partial class CloudServiceExtension { public CloudServiceExtension() { } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.CloudServiceExtensionProperties Properties { get { throw null; } set { } } + } + public partial class CloudServiceExtensionProperties + { + public CloudServiceExtensionProperties() { } public bool? AutoUpgradeMinorVersion { get { throw null; } set { } } public string CloudServiceExtensionPropertiesType { get { throw null; } set { } } public string ForceUpdateTag { get { throw null; } set { } } - public string Name { get { throw null; } set { } } public System.BinaryData ProtectedSettings { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.CloudServiceVaultAndSecretReference ProtectedSettingsFromKeyVault { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } @@ -2535,9 +2548,9 @@ internal CloudServiceInstanceView() { } } public partial class CloudServiceLoadBalancerConfiguration { - public CloudServiceLoadBalancerConfiguration(string name, System.Collections.Generic.IEnumerable frontendIPConfigurations) { } - public System.Collections.Generic.IList FrontendIPConfigurations { get { throw null; } } + public CloudServiceLoadBalancerConfiguration(string name, Azure.ResourceManager.Compute.Models.LoadBalancerConfigurationProperties properties) { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } + public System.Collections.Generic.IList LoadBalancerFrontendIPConfigurations { get { throw null; } set { } } public string Name { get { throw null; } set { } } } public partial class CloudServiceNetworkProfile @@ -2552,6 +2565,22 @@ public partial class CloudServicePatch public CloudServicePatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } } + public partial class CloudServiceProperties + { + public CloudServiceProperties() { } + public bool? AllowModelOverride { get { throw null; } set { } } + public string Configuration { get { throw null; } set { } } + public System.Uri ConfigurationUri { get { throw null; } set { } } + public System.Collections.Generic.IList Extensions { get { throw null; } } + public Azure.ResourceManager.Compute.Models.CloudServiceNetworkProfile NetworkProfile { get { throw null; } set { } } + public System.Collections.Generic.IList OSSecrets { get { throw null; } } + public System.Uri PackageUri { get { throw null; } set { } } + public string ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList Roles { get { throw null; } } + public bool? StartCloudService { get { throw null; } set { } } + public string UniqueId { get { throw null; } } + public Azure.ResourceManager.Compute.Models.CloudServiceUpgradeMode? UpgradeMode { get { throw null; } set { } } + } public partial class CloudServiceRoleProfileProperties { public CloudServiceRoleProfileProperties() { } @@ -3806,6 +3835,13 @@ public partial class ImageDataDisk : Azure.ResourceManager.Compute.Models.ImageD public ImageDataDisk(int lun) { } public int Lun { get { throw null; } set { } } } + public partial class ImageDeprecationStatus + { + public ImageDeprecationStatus() { } + public Azure.ResourceManager.Compute.Models.AlternativeOption AlternativeOption { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.ImageState? ImageState { get { throw null; } set { } } + public System.DateTimeOffset? ScheduledDeprecationOn { get { throw null; } set { } } + } public partial class ImageDisk { public ImageDisk() { } @@ -3850,6 +3886,25 @@ public ImageReference() { } public string Version { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ImageState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ImageState(string value) { throw null; } + public static Azure.ResourceManager.Compute.Models.ImageState Active { get { throw null; } } + public static Azure.ResourceManager.Compute.Models.ImageState Deprecated { get { throw null; } } + public static Azure.ResourceManager.Compute.Models.ImageState ScheduledForDeprecation { get { throw null; } } + public bool Equals(Azure.ResourceManager.Compute.Models.ImageState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Compute.Models.ImageState left, Azure.ResourceManager.Compute.Models.ImageState right) { throw null; } + public static implicit operator Azure.ResourceManager.Compute.Models.ImageState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Compute.Models.ImageState left, Azure.ResourceManager.Compute.Models.ImageState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ImageStorageAccountType : System.IEquatable { private readonly object _dummy; @@ -4055,10 +4110,20 @@ public LinuxPatchSettings() { } public static bool operator !=(Azure.ResourceManager.Compute.Models.LinuxVmGuestPatchMode left, Azure.ResourceManager.Compute.Models.LinuxVmGuestPatchMode right) { throw null; } public override string ToString() { throw null; } } + public partial class LoadBalancerConfigurationProperties + { + public LoadBalancerConfigurationProperties(System.Collections.Generic.IEnumerable frontendIPConfigurations) { } + public System.Collections.Generic.IList FrontendIPConfigurations { get { throw null; } } + } public partial class LoadBalancerFrontendIPConfiguration { - public LoadBalancerFrontendIPConfiguration(string name) { } + public LoadBalancerFrontendIPConfiguration(string name, Azure.ResourceManager.Compute.Models.LoadBalancerFrontendIPConfigurationProperties properties) { } public string Name { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.LoadBalancerFrontendIPConfigurationProperties Properties { get { throw null; } set { } } + } + public partial class LoadBalancerFrontendIPConfigurationProperties + { + public LoadBalancerFrontendIPConfigurationProperties() { } public string PrivateIPAddress { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } @@ -4278,6 +4343,35 @@ public OSDiskImageSecurityProfile() { } public Azure.ResourceManager.Compute.Models.ConfidentialVmEncryptionType? ConfidentialVmEncryptionType { get { throw null; } set { } } public string SecureVmDiskEncryptionSetId { get { throw null; } set { } } } + public partial class OSFamilyProperties + { + internal OSFamilyProperties() { } + public string Label { get { throw null; } } + public string Name { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Versions { get { throw null; } } + } + public partial class OSImageNotificationProfile + { + public OSImageNotificationProfile() { } + public bool? Enable { get { throw null; } set { } } + public string NotBeforeTimeout { get { throw null; } set { } } + } + public partial class OSProfileProvisioningData + { + public OSProfileProvisioningData() { } + public string AdminPassword { get { throw null; } set { } } + public string CustomData { get { throw null; } set { } } + } + public partial class OSVersionProperties + { + internal OSVersionProperties() { } + public string Family { get { throw null; } } + public string FamilyLabel { get { throw null; } } + public bool? IsActive { get { throw null; } } + public bool? IsDefault { get { throw null; } } + public string Label { get { throw null; } } + public string Version { get { throw null; } } + } public partial class OSVersionPropertiesBase { internal OSVersionPropertiesBase() { } @@ -4628,6 +4722,7 @@ internal RestorePointSourceMetadata() { } public Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile OSProfile { get { throw null; } } public Azure.ResourceManager.Compute.Models.SecurityProfile SecurityProfile { get { throw null; } } public Azure.ResourceManager.Compute.Models.RestorePointSourceVmStorageProfile StorageProfile { get { throw null; } } + public string UserData { get { throw null; } } public string VmId { get { throw null; } } } public partial class RestorePointSourceVmDataDisk @@ -4663,6 +4758,12 @@ internal RetrieveBootDiagnosticsDataResult() { } public System.Uri ConsoleScreenshotBlobUri { get { throw null; } } public System.Uri SerialConsoleLogBlobUri { get { throw null; } } } + public partial class RoleInstanceProperties + { + internal RoleInstanceProperties() { } + public Azure.ResourceManager.Compute.Models.RoleInstanceView InstanceView { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NetworkInterfaces { get { throw null; } } + } public partial class RoleInstances { public RoleInstances(System.Collections.Generic.IEnumerable roleInstancesValue) { } @@ -4693,10 +4794,12 @@ public partial class RollingUpgradePolicy public RollingUpgradePolicy() { } public bool? EnableCrossZoneUpgrade { get { throw null; } set { } } public int? MaxBatchInstancePercent { get { throw null; } set { } } + public bool? MaxSurge { get { throw null; } set { } } public int? MaxUnhealthyInstancePercent { get { throw null; } set { } } public int? MaxUnhealthyUpgradedInstancePercent { get { throw null; } set { } } public string PauseTimeBetweenBatches { get { throw null; } set { } } public bool? PrioritizeUnhealthyInstances { get { throw null; } set { } } + public bool? RollbackFailedInstancesOnPolicyBreach { get { throw null; } set { } } } public partial class RollingUpgradeProgressInfo { @@ -4763,6 +4866,12 @@ public ScaleInPolicy() { } public bool? ForceDeletion { get { throw null; } set { } } public System.Collections.Generic.IList Rules { get { throw null; } } } + public partial class ScheduledEventsProfile + { + public ScheduledEventsProfile() { } + public Azure.ResourceManager.Compute.Models.OSImageNotificationProfile OSImageNotificationProfile { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.TerminateNotificationProfile TerminateNotificationProfile { get { throw null; } set { } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SecurityEncryptionType : System.IEquatable { @@ -5329,6 +5438,7 @@ public partial class VirtualMachineImage : Azure.ResourceManager.Compute.Models. public Azure.ResourceManager.Compute.Models.VirtualMachineDiskType? DisallowedVmDiskType { get { throw null; } set { } } public System.Collections.Generic.IList Features { get { throw null; } } public Azure.ResourceManager.Compute.Models.HyperVGeneration? HyperVGeneration { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.ImageDeprecationStatus ImageDeprecationStatus { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType? OSDiskImageOperatingSystem { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.PurchasePlan Plan { get { throw null; } set { } } } @@ -5496,7 +5606,7 @@ public VirtualMachinePatch() { } public Azure.ResourceManager.Compute.Models.VirtualMachinePriorityType? Priority { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier ProximityPlacementGroupId { get { throw null; } set { } } - public Azure.ResourceManager.Compute.Models.TerminateNotificationProfile ScheduledEventsTerminateNotificationProfile { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.ScheduledEventsProfile ScheduledEventsProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.SecurityProfile SecurityProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile StorageProfile { get { throw null; } set { } } public System.DateTimeOffset? TimeCreated { get { throw null; } } @@ -5547,6 +5657,8 @@ public VirtualMachinePublicIPAddressConfiguration(string name) { } public partial class VirtualMachineReimageContent { public VirtualMachineReimageContent() { } + public string ExactVersion { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.OSProfileProvisioningData OSProfile { get { throw null; } set { } } public bool? TempDisk { get { throw null; } set { } } } public partial class VirtualMachineRunCommandInstanceView @@ -5727,6 +5839,7 @@ public VirtualMachineScaleSetOSProfile() { } public string ComputerNamePrefix { get { throw null; } set { } } public string CustomData { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.LinuxConfiguration LinuxConfiguration { get { throw null; } set { } } + public bool? RequireGuestProvisionSignal { get { throw null; } set { } } public System.Collections.Generic.IList Secrets { get { throw null; } } public Azure.ResourceManager.Compute.Models.WindowsConfiguration WindowsConfiguration { get { throw null; } set { } } } @@ -5896,7 +6009,7 @@ public VirtualMachineScaleSetUpdateVmProfile() { } public string LicenseType { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpdateNetworkProfile NetworkProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpdateOSProfile OSProfile { get { throw null; } set { } } - public Azure.ResourceManager.Compute.Models.TerminateNotificationProfile ScheduledEventsTerminateNotificationProfile { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.ScheduledEventsProfile ScheduledEventsProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.SecurityProfile SecurityProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpdateStorageProfile StorageProfile { get { throw null; } set { } } public string UserData { get { throw null; } set { } } @@ -5976,8 +6089,9 @@ public VirtualMachineScaleSetVmProfile() { } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetNetworkProfile NetworkProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetOSProfile OSProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachinePriorityType? Priority { get { throw null; } set { } } - public Azure.ResourceManager.Compute.Models.TerminateNotificationProfile ScheduledEventsTerminateNotificationProfile { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.ScheduledEventsProfile ScheduledEventsProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.SecurityProfile SecurityProfile { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ServiceArtifactReferenceId { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetStorageProfile StorageProfile { get { throw null; } set { } } public string UserData { get { throw null; } set { } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceData.cs index f15c8bf273f2..178b30111e8c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceData.cs @@ -5,7 +5,6 @@ #nullable disable -using System; using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Compute.Models; @@ -20,6 +19,7 @@ public partial class CloudServiceData : TrackedResourceData /// The location. public CloudServiceData(AzureLocation location) : base(location) { + Zones = new ChangeTrackingList(); } /// Initializes a new instance of CloudServiceData. @@ -29,122 +29,17 @@ public CloudServiceData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// - /// Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. - /// This is a write-only property and is not returned in GET calls. - /// - /// Specifies the XML service configuration (.cscfg) for the cloud service. - /// - /// Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. - /// This is a write-only property and is not returned in GET calls. - /// - /// - /// (Optional) Indicates whether to start the cloud service immediately after it is created. The default value is `true`. - /// If false, the service model is still deployed, but the code is not run immediately. Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service still incurs charges, even if it is poweredoff. - /// - /// - /// (Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override the role instance count and vm size specified in the .cscfg and .csdef respectively. - /// The default value is `false`. - /// - /// - /// Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. - /// Possible Values are <br /><br />**Auto**<br /><br />**Manual** <br /><br />**Simultaneous**<br /><br /> - /// If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. - /// - /// Describes the role profile for the cloud service. - /// Describes the OS profile for the cloud service. - /// Network Profile for the cloud service. - /// Describes a cloud service extension profile. - /// The provisioning state, which only appears in the response. - /// The unique identifier for the cloud service. - internal CloudServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, Uri packageUri, string configuration, Uri configurationUri, bool? startCloudService, bool? allowModelOverride, CloudServiceUpgradeMode? upgradeMode, CloudServiceRoleProfile roleProfile, CloudServiceOSProfile osProfile, CloudServiceNetworkProfile networkProfile, CloudServiceExtensionProfile extensionProfile, string provisioningState, string uniqueId) : base(id, name, resourceType, systemData, tags, location) + /// Cloud service properties. + /// List of logical availability zone of the resource. List should contain only 1 zone where cloud service should be provisioned. This field is optional. + internal CloudServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CloudServiceProperties properties, IList zones) : base(id, name, resourceType, systemData, tags, location) { - PackageUri = packageUri; - Configuration = configuration; - ConfigurationUri = configurationUri; - StartCloudService = startCloudService; - AllowModelOverride = allowModelOverride; - UpgradeMode = upgradeMode; - RoleProfile = roleProfile; - OSProfile = osProfile; - NetworkProfile = networkProfile; - ExtensionProfile = extensionProfile; - ProvisioningState = provisioningState; - UniqueId = uniqueId; + Properties = properties; + Zones = zones; } - /// - /// Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. - /// This is a write-only property and is not returned in GET calls. - /// - public Uri PackageUri { get; set; } - /// Specifies the XML service configuration (.cscfg) for the cloud service. - public string Configuration { get; set; } - /// - /// Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. - /// This is a write-only property and is not returned in GET calls. - /// - public Uri ConfigurationUri { get; set; } - /// - /// (Optional) Indicates whether to start the cloud service immediately after it is created. The default value is `true`. - /// If false, the service model is still deployed, but the code is not run immediately. Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service still incurs charges, even if it is poweredoff. - /// - public bool? StartCloudService { get; set; } - /// - /// (Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override the role instance count and vm size specified in the .cscfg and .csdef respectively. - /// The default value is `false`. - /// - public bool? AllowModelOverride { get; set; } - /// - /// Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. - /// Possible Values are <br /><br />**Auto**<br /><br />**Manual** <br /><br />**Simultaneous**<br /><br /> - /// If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. - /// - public CloudServiceUpgradeMode? UpgradeMode { get; set; } - /// Describes the role profile for the cloud service. - internal CloudServiceRoleProfile RoleProfile { get; set; } - /// List of roles for the cloud service. - public IList Roles - { - get - { - if (RoleProfile is null) - RoleProfile = new CloudServiceRoleProfile(); - return RoleProfile.Roles; - } - } - - /// Describes the OS profile for the cloud service. - internal CloudServiceOSProfile OSProfile { get; set; } - /// Specifies set of certificates that should be installed onto the role instances. - public IList OSSecrets - { - get - { - if (OSProfile is null) - OSProfile = new CloudServiceOSProfile(); - return OSProfile.Secrets; - } - } - - /// Network Profile for the cloud service. - public CloudServiceNetworkProfile NetworkProfile { get; set; } - /// Describes a cloud service extension profile. - internal CloudServiceExtensionProfile ExtensionProfile { get; set; } - /// List of extensions for the cloud service. - public IList Extensions - { - get - { - if (ExtensionProfile is null) - ExtensionProfile = new CloudServiceExtensionProfile(); - return ExtensionProfile.Extensions; - } - } - - /// The provisioning state, which only appears in the response. - public string ProvisioningState { get; } - /// The unique identifier for the cloud service. - public string UniqueId { get; } + /// Cloud service properties. + public CloudServiceProperties Properties { get; set; } + /// List of logical availability zone of the resource. List should contain only 1 zone where cloud service should be provisioned. This field is optional. + public IList Zones { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSFamilyData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSFamilyData.cs index b46874bf3969..074f11cba603 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSFamilyData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSFamilyData.cs @@ -5,7 +5,6 @@ #nullable disable -using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Compute.Models; using Azure.ResourceManager.Models; @@ -18,7 +17,6 @@ public partial class CloudServiceOSFamilyData : ResourceData /// Initializes a new instance of CloudServiceOSFamilyData. internal CloudServiceOSFamilyData() { - Versions = new ChangeTrackingList(); } /// Initializes a new instance of CloudServiceOSFamilyData. @@ -28,27 +26,19 @@ internal CloudServiceOSFamilyData() /// The systemData. /// Resource name. /// Resource location. - /// The OS family name. - /// The OS family label. - /// List of OS versions belonging to this family. - internal CloudServiceOSFamilyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string resourceName, AzureLocation? location, string osFamilyName, string label, IReadOnlyList versions) : base(id, name, resourceType, systemData) + /// OS family properties. + internal CloudServiceOSFamilyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string resourceName, AzureLocation? location, OSFamilyProperties properties) : base(id, name, resourceType, systemData) { ResourceName = resourceName; Location = location; - OSFamilyName = osFamilyName; - Label = label; - Versions = versions; + Properties = properties; } /// Resource name. public string ResourceName { get; } /// Resource location. public AzureLocation? Location { get; } - /// The OS family name. - public string OSFamilyName { get; } - /// The OS family label. - public string Label { get; } - /// List of OS versions belonging to this family. - public IReadOnlyList Versions { get; } + /// OS family properties. + public OSFamilyProperties Properties { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSVersionData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSVersionData.cs index cb41da50fb5e..85a5388ac1d7 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSVersionData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSVersionData.cs @@ -6,6 +6,7 @@ #nullable disable using Azure.Core; +using Azure.ResourceManager.Compute.Models; using Azure.ResourceManager.Models; namespace Azure.ResourceManager.Compute @@ -24,36 +25,16 @@ internal CloudServiceOSVersionData() /// The resourceType. /// The systemData. /// Resource location. - /// The family of this OS version. - /// The family label of this OS version. - /// The OS version. - /// The OS version label. - /// Specifies whether this is the default OS version for its family. - /// Specifies whether this OS version is active. - internal CloudServiceOSVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, string family, string familyLabel, string version, string label, bool? isDefault, bool? isActive) : base(id, name, resourceType, systemData) + /// OS version properties. + internal CloudServiceOSVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, OSVersionProperties properties) : base(id, name, resourceType, systemData) { Location = location; - Family = family; - FamilyLabel = familyLabel; - Version = version; - Label = label; - IsDefault = isDefault; - IsActive = isActive; + Properties = properties; } /// Resource location. public AzureLocation? Location { get; } - /// The family of this OS version. - public string Family { get; } - /// The family label of this OS version. - public string FamilyLabel { get; } - /// The OS version. - public string Version { get; } - /// The OS version label. - public string Label { get; } - /// Specifies whether this is the default OS version for its family. - public bool? IsDefault { get; } - /// Specifies whether this OS version is active. - public bool? IsActive { get; } + /// OS version properties. + public OSVersionProperties Properties { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleData.cs index 0df20a9bfb8a..fded283d9357 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleData.cs @@ -26,19 +26,24 @@ internal CloudServiceRoleData() /// The systemData. /// Resource location. /// Describes the cloud service role sku. - /// Specifies the ID which uniquely identifies a cloud service role. - internal CloudServiceRoleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, CloudServiceRoleSku sku, string uniqueId) : base(id, name, resourceType, systemData) + /// The cloud service role properties. + internal CloudServiceRoleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, CloudServiceRoleSku sku, CloudServiceRoleProperties properties) : base(id, name, resourceType, systemData) { Location = location; Sku = sku; - UniqueId = uniqueId; + Properties = properties; } /// Resource location. public AzureLocation? Location { get; } /// Describes the cloud service role sku. public CloudServiceRoleSku Sku { get; } + /// The cloud service role properties. + internal CloudServiceRoleProperties Properties { get; } /// Specifies the ID which uniquely identifies a cloud service role. - public string UniqueId { get; } + public string CloudServiceRoleUniqueId + { + get => Properties?.UniqueId; + } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleInstanceData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleInstanceData.cs index 3d4f4afd4d76..a0e6743f3fbc 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleInstanceData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleInstanceData.cs @@ -9,7 +9,6 @@ using Azure.Core; using Azure.ResourceManager.Compute.Models; using Azure.ResourceManager.Models; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Compute { @@ -30,15 +29,13 @@ internal CloudServiceRoleInstanceData() /// Resource Location. /// Resource tags. /// The role instance SKU. - /// Describes the network profile for the role instance. - /// The instance view of the role instance. - internal CloudServiceRoleInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, IReadOnlyDictionary tags, InstanceSku sku, RoleInstanceNetworkProfile networkProfile, RoleInstanceView instanceView) : base(id, name, resourceType, systemData) + /// Role instance properties. + internal CloudServiceRoleInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, IReadOnlyDictionary tags, InstanceSku sku, RoleInstanceProperties properties) : base(id, name, resourceType, systemData) { Location = location; Tags = tags; Sku = sku; - NetworkProfile = networkProfile; - InstanceView = instanceView; + Properties = properties; } /// Resource Location. @@ -47,15 +44,7 @@ internal CloudServiceRoleInstanceData(ResourceIdentifier id, string name, Resour public IReadOnlyDictionary Tags { get; } /// The role instance SKU. public InstanceSku Sku { get; } - /// Describes the network profile for the role instance. - internal RoleInstanceNetworkProfile NetworkProfile { get; } - /// Specifies the list of resource Ids for the network interfaces associated with the role instance. - public IReadOnlyList NetworkInterfaces - { - get => NetworkProfile?.NetworkInterfaces; - } - - /// The instance view of the role instance. - public RoleInstanceView InstanceView { get; } + /// Role instance properties. + public RoleInstanceProperties Properties { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AlternativeOption.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AlternativeOption.Serialization.cs new file mode 100644 index 000000000000..fc16853577c9 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AlternativeOption.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Models +{ + public partial class AlternativeOption : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AlternativeType)) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(AlternativeType.Value.ToString()); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"); + writer.WriteStringValue(Value); + } + writer.WriteEndObject(); + } + + internal static AlternativeOption DeserializeAlternativeOption(JsonElement element) + { + Optional type = default; + Optional value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + type = new AlternativeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + } + return new AlternativeOption(Optional.ToNullable(type), value.Value); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AlternativeOption.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AlternativeOption.cs new file mode 100644 index 000000000000..0821cae303af --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AlternativeOption.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Compute.Models +{ + /// Describes the alternative option specified by the Publisher for this image when this image is deprecated. + public partial class AlternativeOption + { + /// Initializes a new instance of AlternativeOption. + public AlternativeOption() + { + } + + /// Initializes a new instance of AlternativeOption. + /// Describes the type of the alternative option. + /// Indicates the alternative option value specified by the Publisher. This is the Offer name when the type is Offer or the Plan name when the type is Plan. + internal AlternativeOption(AlternativeType? alternativeType, string value) + { + AlternativeType = alternativeType; + Value = value; + } + + /// Describes the type of the alternative option. + public AlternativeType? AlternativeType { get; set; } + /// Indicates the alternative option value specified by the Publisher. This is the Offer name when the type is Offer or the Plan name when the type is Plan. + public string Value { get; set; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AlternativeType.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AlternativeType.cs new file mode 100644 index 000000000000..9b1ea28e4d7b --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AlternativeType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Compute.Models +{ + /// Describes the type of the alternative option. + public readonly partial struct AlternativeType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AlternativeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string OfferValue = "Offer"; + private const string PlanValue = "Plan"; + + /// None. + public static AlternativeType None { get; } = new AlternativeType(NoneValue); + /// Offer. + public static AlternativeType Offer { get; } = new AlternativeType(OfferValue); + /// Plan. + public static AlternativeType Plan { get; } = new AlternativeType(PlanValue); + /// Determines if two values are the same. + public static bool operator ==(AlternativeType left, AlternativeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AlternativeType left, AlternativeType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AlternativeType(string value) => new AlternativeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AlternativeType other && Equals(other); + /// + public bool Equals(AlternativeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceData.Serialization.cs index d358239d4346..17078935bb17 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceData.Serialization.cs @@ -5,7 +5,6 @@ #nullable disable -using System; using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -19,6 +18,21 @@ public partial class CloudServiceData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + if (Optional.IsCollectionDefined(Zones)) + { + writer.WritePropertyName("zones"); + writer.WriteStartArray(); + foreach (var item in Zones) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"); @@ -32,84 +46,46 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WritePropertyName("location"); writer.WriteStringValue(Location); - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - if (Optional.IsDefined(PackageUri)) - { - writer.WritePropertyName("packageUrl"); - writer.WriteStringValue(PackageUri.AbsoluteUri); - } - if (Optional.IsDefined(Configuration)) - { - writer.WritePropertyName("configuration"); - writer.WriteStringValue(Configuration); - } - if (Optional.IsDefined(ConfigurationUri)) - { - writer.WritePropertyName("configurationUrl"); - writer.WriteStringValue(ConfigurationUri.AbsoluteUri); - } - if (Optional.IsDefined(StartCloudService)) - { - writer.WritePropertyName("startCloudService"); - writer.WriteBooleanValue(StartCloudService.Value); - } - if (Optional.IsDefined(AllowModelOverride)) - { - writer.WritePropertyName("allowModelOverride"); - writer.WriteBooleanValue(AllowModelOverride.Value); - } - if (Optional.IsDefined(UpgradeMode)) - { - writer.WritePropertyName("upgradeMode"); - writer.WriteStringValue(UpgradeMode.Value.ToString()); - } - if (Optional.IsDefined(RoleProfile)) - { - writer.WritePropertyName("roleProfile"); - writer.WriteObjectValue(RoleProfile); - } - if (Optional.IsDefined(OSProfile)) - { - writer.WritePropertyName("osProfile"); - writer.WriteObjectValue(OSProfile); - } - if (Optional.IsDefined(NetworkProfile)) - { - writer.WritePropertyName("networkProfile"); - writer.WriteObjectValue(NetworkProfile); - } - if (Optional.IsDefined(ExtensionProfile)) - { - writer.WritePropertyName("extensionProfile"); - writer.WriteObjectValue(ExtensionProfile); - } - writer.WriteEndObject(); writer.WriteEndObject(); } internal static CloudServiceData DeserializeCloudServiceData(JsonElement element) { + Optional properties = default; + Optional> zones = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; Optional systemData = default; - Optional packageUrl = default; - Optional configuration = default; - Optional configurationUrl = default; - Optional startCloudService = default; - Optional allowModelOverride = default; - Optional upgradeMode = default; - Optional roleProfile = default; - Optional osProfile = default; - Optional networkProfile = default; - Optional extensionProfile = default; - Optional provisioningState = default; - Optional uniqueId = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = CloudServiceProperties.DeserializeCloudServiceProperties(property.Value); + continue; + } + if (property.NameEquals("zones")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } if (property.NameEquals("tags")) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -155,125 +131,8 @@ internal static CloudServiceData DeserializeCloudServiceData(JsonElement element systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("packageUrl")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - packageUrl = null; - continue; - } - packageUrl = new Uri(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("configuration")) - { - configuration = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("configurationUrl")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - configurationUrl = null; - continue; - } - configurationUrl = new Uri(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("startCloudService")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - startCloudService = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("allowModelOverride")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - allowModelOverride = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("upgradeMode")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - upgradeMode = new CloudServiceUpgradeMode(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("roleProfile")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - roleProfile = CloudServiceRoleProfile.DeserializeCloudServiceRoleProfile(property0.Value); - continue; - } - if (property0.NameEquals("osProfile")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - osProfile = CloudServiceOSProfile.DeserializeCloudServiceOSProfile(property0.Value); - continue; - } - if (property0.NameEquals("networkProfile")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - networkProfile = CloudServiceNetworkProfile.DeserializeCloudServiceNetworkProfile(property0.Value); - continue; - } - if (property0.NameEquals("extensionProfile")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - extensionProfile = CloudServiceExtensionProfile.DeserializeCloudServiceExtensionProfile(property0.Value); - continue; - } - if (property0.NameEquals("provisioningState")) - { - provisioningState = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("uniqueId")) - { - uniqueId = property0.Value.GetString(); - continue; - } - } - continue; - } } - return new CloudServiceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, packageUrl.Value, configuration.Value, configurationUrl.Value, Optional.ToNullable(startCloudService), Optional.ToNullable(allowModelOverride), Optional.ToNullable(upgradeMode), roleProfile.Value, osProfile.Value, networkProfile.Value, extensionProfile.Value, provisioningState.Value, uniqueId.Value); + return new CloudServiceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, properties.Value, Optional.ToList(zones)); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtension.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtension.Serialization.cs index 8795d08b2ba0..f883b40a4caf 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtension.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtension.Serialization.cs @@ -5,8 +5,6 @@ #nullable disable -using System; -using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -22,83 +20,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("name"); writer.WriteStringValue(Name); } - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - if (Optional.IsDefined(Publisher)) - { - writer.WritePropertyName("publisher"); - writer.WriteStringValue(Publisher); - } - if (Optional.IsDefined(CloudServiceExtensionPropertiesType)) - { - writer.WritePropertyName("type"); - writer.WriteStringValue(CloudServiceExtensionPropertiesType); - } - if (Optional.IsDefined(TypeHandlerVersion)) - { - writer.WritePropertyName("typeHandlerVersion"); - writer.WriteStringValue(TypeHandlerVersion); - } - if (Optional.IsDefined(AutoUpgradeMinorVersion)) - { - writer.WritePropertyName("autoUpgradeMinorVersion"); - writer.WriteBooleanValue(AutoUpgradeMinorVersion.Value); - } - if (Optional.IsDefined(Settings)) - { - writer.WritePropertyName("settings"); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Settings); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Settings.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(ProtectedSettings)) + if (Optional.IsDefined(Properties)) { - writer.WritePropertyName("protectedSettings"); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ProtectedSettings); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ProtectedSettings.ToString()).RootElement); -#endif + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); } - if (Optional.IsDefined(ProtectedSettingsFromKeyVault)) - { - writer.WritePropertyName("protectedSettingsFromKeyVault"); - writer.WriteObjectValue(ProtectedSettingsFromKeyVault); - } - if (Optional.IsDefined(ForceUpdateTag)) - { - writer.WritePropertyName("forceUpdateTag"); - writer.WriteStringValue(ForceUpdateTag); - } - if (Optional.IsCollectionDefined(RolesAppliedTo)) - { - writer.WritePropertyName("rolesAppliedTo"); - writer.WriteStartArray(); - foreach (var item in RolesAppliedTo) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); writer.WriteEndObject(); } internal static CloudServiceExtension DeserializeCloudServiceExtension(JsonElement element) { Optional name = default; - Optional publisher = default; - Optional type = default; - Optional typeHandlerVersion = default; - Optional autoUpgradeMinorVersion = default; - Optional settings = default; - Optional protectedSettings = default; - Optional protectedSettingsFromKeyVault = default; - Optional forceUpdateTag = default; - Optional provisioningState = default; - Optional> rolesAppliedTo = default; + Optional properties = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name")) @@ -113,93 +46,11 @@ internal static CloudServiceExtension DeserializeCloudServiceExtension(JsonEleme property.ThrowNonNullablePropertyIsNull(); continue; } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("publisher")) - { - publisher = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("type")) - { - type = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("typeHandlerVersion")) - { - typeHandlerVersion = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("autoUpgradeMinorVersion")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - autoUpgradeMinorVersion = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("settings")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - settings = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("protectedSettings")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - protectedSettings = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("protectedSettingsFromKeyVault")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - protectedSettingsFromKeyVault = CloudServiceVaultAndSecretReference.DeserializeCloudServiceVaultAndSecretReference(property0.Value); - continue; - } - if (property0.NameEquals("forceUpdateTag")) - { - forceUpdateTag = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("provisioningState")) - { - provisioningState = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("rolesAppliedTo")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - rolesAppliedTo = array; - continue; - } - } + properties = CloudServiceExtensionProperties.DeserializeCloudServiceExtensionProperties(property.Value); continue; } } - return new CloudServiceExtension(name.Value, publisher.Value, type.Value, typeHandlerVersion.Value, Optional.ToNullable(autoUpgradeMinorVersion), settings.Value, protectedSettings.Value, protectedSettingsFromKeyVault.Value, forceUpdateTag.Value, provisioningState.Value, Optional.ToList(rolesAppliedTo)); + return new CloudServiceExtension(name.Value, properties.Value); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtension.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtension.cs index b229bd204c2f..4969734ae634 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtension.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtension.cs @@ -5,10 +5,6 @@ #nullable disable -using System; -using System.Collections.Generic; -using Azure.Core; - namespace Azure.ResourceManager.Compute.Models { /// Describes a cloud service Extension. @@ -17,127 +13,20 @@ public partial class CloudServiceExtension /// Initializes a new instance of CloudServiceExtension. public CloudServiceExtension() { - RolesAppliedTo = new ChangeTrackingList(); } /// Initializes a new instance of CloudServiceExtension. /// The name of the extension. - /// The name of the extension handler publisher. - /// Specifies the type of the extension. - /// Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, the latest version of the extension is used. If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major version is selected. If a major version number and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on the role instance. - /// Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available. - /// Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension. - /// Protected settings for the extension which are encrypted before sent to the role instance. - /// Protected settings for the extension, referenced using KeyVault which are encrypted before sent to the role instance. - /// - /// Tag to force apply the provided public and protected settings. - /// Changing the tag value allows for re-running the extension without changing any of the public or protected settings. - /// If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler. - /// If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and - /// it is up to handler implementation whether to re-run it or not - /// - /// The provisioning state, which only appears in the response. - /// Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service. - internal CloudServiceExtension(string name, string publisher, string cloudServiceExtensionPropertiesType, string typeHandlerVersion, bool? autoUpgradeMinorVersion, BinaryData settings, BinaryData protectedSettings, CloudServiceVaultAndSecretReference protectedSettingsFromKeyVault, string forceUpdateTag, string provisioningState, IList rolesAppliedTo) + /// Extension Properties. + internal CloudServiceExtension(string name, CloudServiceExtensionProperties properties) { Name = name; - Publisher = publisher; - CloudServiceExtensionPropertiesType = cloudServiceExtensionPropertiesType; - TypeHandlerVersion = typeHandlerVersion; - AutoUpgradeMinorVersion = autoUpgradeMinorVersion; - Settings = settings; - ProtectedSettings = protectedSettings; - ProtectedSettingsFromKeyVault = protectedSettingsFromKeyVault; - ForceUpdateTag = forceUpdateTag; - ProvisioningState = provisioningState; - RolesAppliedTo = rolesAppliedTo; + Properties = properties; } /// The name of the extension. public string Name { get; set; } - /// The name of the extension handler publisher. - public string Publisher { get; set; } - /// Specifies the type of the extension. - public string CloudServiceExtensionPropertiesType { get; set; } - /// Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, the latest version of the extension is used. If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major version is selected. If a major version number and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on the role instance. - public string TypeHandlerVersion { get; set; } - /// Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available. - public bool? AutoUpgradeMinorVersion { get; set; } - /// - /// Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Settings { get; set; } - /// - /// Protected settings for the extension which are encrypted before sent to the role instance. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ProtectedSettings { get; set; } - /// Protected settings for the extension, referenced using KeyVault which are encrypted before sent to the role instance. - public CloudServiceVaultAndSecretReference ProtectedSettingsFromKeyVault { get; set; } - /// - /// Tag to force apply the provided public and protected settings. - /// Changing the tag value allows for re-running the extension without changing any of the public or protected settings. - /// If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler. - /// If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and - /// it is up to handler implementation whether to re-run it or not - /// - public string ForceUpdateTag { get; set; } - /// The provisioning state, which only appears in the response. - public string ProvisioningState { get; } - /// Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service. - public IList RolesAppliedTo { get; } + /// Extension Properties. + public CloudServiceExtensionProperties Properties { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtensionProperties.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtensionProperties.Serialization.cs new file mode 100644 index 000000000000..7ce40add9355 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtensionProperties.Serialization.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Models +{ + public partial class CloudServiceExtensionProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Publisher)) + { + writer.WritePropertyName("publisher"); + writer.WriteStringValue(Publisher); + } + if (Optional.IsDefined(CloudServiceExtensionPropertiesType)) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(CloudServiceExtensionPropertiesType); + } + if (Optional.IsDefined(TypeHandlerVersion)) + { + writer.WritePropertyName("typeHandlerVersion"); + writer.WriteStringValue(TypeHandlerVersion); + } + if (Optional.IsDefined(AutoUpgradeMinorVersion)) + { + writer.WritePropertyName("autoUpgradeMinorVersion"); + writer.WriteBooleanValue(AutoUpgradeMinorVersion.Value); + } + if (Optional.IsDefined(Settings)) + { + writer.WritePropertyName("settings"); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Settings); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(Settings.ToString()).RootElement); +#endif + } + if (Optional.IsDefined(ProtectedSettings)) + { + writer.WritePropertyName("protectedSettings"); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ProtectedSettings); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(ProtectedSettings.ToString()).RootElement); +#endif + } + if (Optional.IsDefined(ProtectedSettingsFromKeyVault)) + { + writer.WritePropertyName("protectedSettingsFromKeyVault"); + writer.WriteObjectValue(ProtectedSettingsFromKeyVault); + } + if (Optional.IsDefined(ForceUpdateTag)) + { + writer.WritePropertyName("forceUpdateTag"); + writer.WriteStringValue(ForceUpdateTag); + } + if (Optional.IsCollectionDefined(RolesAppliedTo)) + { + writer.WritePropertyName("rolesAppliedTo"); + writer.WriteStartArray(); + foreach (var item in RolesAppliedTo) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static CloudServiceExtensionProperties DeserializeCloudServiceExtensionProperties(JsonElement element) + { + Optional publisher = default; + Optional type = default; + Optional typeHandlerVersion = default; + Optional autoUpgradeMinorVersion = default; + Optional settings = default; + Optional protectedSettings = default; + Optional protectedSettingsFromKeyVault = default; + Optional forceUpdateTag = default; + Optional provisioningState = default; + Optional> rolesAppliedTo = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publisher")) + { + publisher = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("typeHandlerVersion")) + { + typeHandlerVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoUpgradeMinorVersion")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + autoUpgradeMinorVersion = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("settings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + settings = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("protectedSettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + protectedSettings = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("protectedSettingsFromKeyVault")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + protectedSettingsFromKeyVault = CloudServiceVaultAndSecretReference.DeserializeCloudServiceVaultAndSecretReference(property.Value); + continue; + } + if (property.NameEquals("forceUpdateTag")) + { + forceUpdateTag = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + provisioningState = property.Value.GetString(); + continue; + } + if (property.NameEquals("rolesAppliedTo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + rolesAppliedTo = array; + continue; + } + } + return new CloudServiceExtensionProperties(publisher.Value, type.Value, typeHandlerVersion.Value, Optional.ToNullable(autoUpgradeMinorVersion), settings.Value, protectedSettings.Value, protectedSettingsFromKeyVault.Value, forceUpdateTag.Value, provisioningState.Value, Optional.ToList(rolesAppliedTo)); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtensionProperties.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtensionProperties.cs new file mode 100644 index 000000000000..85bde1513bd3 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtensionProperties.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Models +{ + /// Extension Properties. + public partial class CloudServiceExtensionProperties + { + /// Initializes a new instance of CloudServiceExtensionProperties. + public CloudServiceExtensionProperties() + { + RolesAppliedTo = new ChangeTrackingList(); + } + + /// Initializes a new instance of CloudServiceExtensionProperties. + /// The name of the extension handler publisher. + /// Specifies the type of the extension. + /// Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, the latest version of the extension is used. If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major version is selected. If a major version number and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on the role instance. + /// Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available. + /// Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension. + /// Protected settings for the extension which are encrypted before sent to the role instance. + /// Protected settings for the extension, referenced using KeyVault which are encrypted before sent to the role instance. + /// + /// Tag to force apply the provided public and protected settings. + /// Changing the tag value allows for re-running the extension without changing any of the public or protected settings. + /// If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler. + /// If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and + /// it is up to handler implementation whether to re-run it or not + /// + /// The provisioning state, which only appears in the response. + /// Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service. + internal CloudServiceExtensionProperties(string publisher, string cloudServiceExtensionPropertiesType, string typeHandlerVersion, bool? autoUpgradeMinorVersion, BinaryData settings, BinaryData protectedSettings, CloudServiceVaultAndSecretReference protectedSettingsFromKeyVault, string forceUpdateTag, string provisioningState, IList rolesAppliedTo) + { + Publisher = publisher; + CloudServiceExtensionPropertiesType = cloudServiceExtensionPropertiesType; + TypeHandlerVersion = typeHandlerVersion; + AutoUpgradeMinorVersion = autoUpgradeMinorVersion; + Settings = settings; + ProtectedSettings = protectedSettings; + ProtectedSettingsFromKeyVault = protectedSettingsFromKeyVault; + ForceUpdateTag = forceUpdateTag; + ProvisioningState = provisioningState; + RolesAppliedTo = rolesAppliedTo; + } + + /// The name of the extension handler publisher. + public string Publisher { get; set; } + /// Specifies the type of the extension. + public string CloudServiceExtensionPropertiesType { get; set; } + /// Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, the latest version of the extension is used. If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major version is selected. If a major version number and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on the role instance. + public string TypeHandlerVersion { get; set; } + /// Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available. + public bool? AutoUpgradeMinorVersion { get; set; } + /// + /// Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData Settings { get; set; } + /// + /// Protected settings for the extension which are encrypted before sent to the role instance. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData ProtectedSettings { get; set; } + /// Protected settings for the extension, referenced using KeyVault which are encrypted before sent to the role instance. + public CloudServiceVaultAndSecretReference ProtectedSettingsFromKeyVault { get; set; } + /// + /// Tag to force apply the provided public and protected settings. + /// Changing the tag value allows for re-running the extension without changing any of the public or protected settings. + /// If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler. + /// If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and + /// it is up to handler implementation whether to re-run it or not + /// + public string ForceUpdateTag { get; set; } + /// The provisioning state, which only appears in the response. + public string ProvisioningState { get; } + /// Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service. + public IList RolesAppliedTo { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceLoadBalancerConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceLoadBalancerConfiguration.Serialization.cs index 0497e3d8abdd..8891a6c8f2c3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceLoadBalancerConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceLoadBalancerConfiguration.Serialization.cs @@ -5,7 +5,6 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -24,15 +23,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("name"); writer.WriteStringValue(Name); writer.WritePropertyName("properties"); - writer.WriteStartObject(); - writer.WritePropertyName("frontendIpConfigurations"); - writer.WriteStartArray(); - foreach (var item in FrontendIPConfigurations) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); + writer.WriteObjectValue(Properties); writer.WriteEndObject(); } @@ -40,7 +31,7 @@ internal static CloudServiceLoadBalancerConfiguration DeserializeCloudServiceLoa { Optional id = default; string name = default; - IList frontendIPConfigurations = default; + LoadBalancerConfigurationProperties properties = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id")) @@ -60,28 +51,11 @@ internal static CloudServiceLoadBalancerConfiguration DeserializeCloudServiceLoa } if (property.NameEquals("properties")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("frontendIpConfigurations")) - { - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(LoadBalancerFrontendIPConfiguration.DeserializeLoadBalancerFrontendIPConfiguration(item)); - } - frontendIPConfigurations = array; - continue; - } - } + properties = LoadBalancerConfigurationProperties.DeserializeLoadBalancerConfigurationProperties(property.Value); continue; } } - return new CloudServiceLoadBalancerConfiguration(id.Value, name, frontendIPConfigurations); + return new CloudServiceLoadBalancerConfiguration(id.Value, name, properties); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceLoadBalancerConfiguration.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceLoadBalancerConfiguration.cs index 5efd7d2501f3..7a2fe9310f4c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceLoadBalancerConfiguration.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceLoadBalancerConfiguration.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; using Azure.Core; namespace Azure.ResourceManager.Compute.Models @@ -17,33 +16,39 @@ public partial class CloudServiceLoadBalancerConfiguration { /// Initializes a new instance of CloudServiceLoadBalancerConfiguration. /// The name of the Load balancer. - /// Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration. - /// or is null. - public CloudServiceLoadBalancerConfiguration(string name, IEnumerable frontendIPConfigurations) + /// Properties of the load balancer configuration. + /// or is null. + public CloudServiceLoadBalancerConfiguration(string name, LoadBalancerConfigurationProperties properties) { Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(frontendIPConfigurations, nameof(frontendIPConfigurations)); + Argument.AssertNotNull(properties, nameof(properties)); Name = name; - FrontendIPConfigurations = frontendIPConfigurations.ToList(); + Properties = properties; } /// Initializes a new instance of CloudServiceLoadBalancerConfiguration. /// Resource Id. /// The name of the Load balancer. - /// Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration. - internal CloudServiceLoadBalancerConfiguration(ResourceIdentifier id, string name, IList frontendIPConfigurations) + /// Properties of the load balancer configuration. + internal CloudServiceLoadBalancerConfiguration(ResourceIdentifier id, string name, LoadBalancerConfigurationProperties properties) { Id = id; Name = name; - FrontendIPConfigurations = frontendIPConfigurations; + Properties = properties; } /// Resource Id. public ResourceIdentifier Id { get; set; } /// The name of the Load balancer. public string Name { get; set; } + /// Properties of the load balancer configuration. + internal LoadBalancerConfigurationProperties Properties { get; set; } /// Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration. - public IList FrontendIPConfigurations { get; } + public IList LoadBalancerFrontendIPConfigurations + { + get => Properties is null ? default : Properties.FrontendIPConfigurations; + set => Properties = new LoadBalancerConfigurationProperties(value); + } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceOSFamilyData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceOSFamilyData.Serialization.cs index 9ede53b32352..88f71ae8e7b6 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceOSFamilyData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceOSFamilyData.Serialization.cs @@ -5,7 +5,6 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Compute.Models; @@ -19,13 +18,11 @@ internal static CloudServiceOSFamilyData DeserializeCloudServiceOSFamilyData(Jso { Optional name = default; Optional location = default; + Optional properties = default; ResourceIdentifier id = default; string name0 = default; ResourceType type = default; Optional systemData = default; - Optional name1 = default; - Optional label = default; - Optional> versions = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name")) @@ -43,6 +40,16 @@ internal static CloudServiceOSFamilyData DeserializeCloudServiceOSFamilyData(Jso location = new AzureLocation(property.Value.GetString()); continue; } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = OSFamilyProperties.DeserializeOSFamilyProperties(property.Value); + continue; + } if (property.NameEquals("id")) { id = new ResourceIdentifier(property.Value.GetString()); @@ -68,45 +75,8 @@ internal static CloudServiceOSFamilyData DeserializeCloudServiceOSFamilyData(Jso systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("name")) - { - name1 = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("label")) - { - label = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("versions")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(OSVersionPropertiesBase.DeserializeOSVersionPropertiesBase(item)); - } - versions = array; - continue; - } - } - continue; - } } - return new CloudServiceOSFamilyData(id, name0, type, systemData.Value, name.Value, Optional.ToNullable(location), name1.Value, label.Value, Optional.ToList(versions)); + return new CloudServiceOSFamilyData(id, name0, type, systemData.Value, name.Value, Optional.ToNullable(location), properties.Value); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceOSVersionData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceOSVersionData.Serialization.cs index 0bfe13f37a74..3738d3971075 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceOSVersionData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceOSVersionData.Serialization.cs @@ -7,6 +7,7 @@ using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Compute.Models; using Azure.ResourceManager.Models; namespace Azure.ResourceManager.Compute @@ -16,16 +17,11 @@ public partial class CloudServiceOSVersionData internal static CloudServiceOSVersionData DeserializeCloudServiceOSVersionData(JsonElement element) { Optional location = default; + Optional properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; Optional systemData = default; - Optional family = default; - Optional familyLabel = default; - Optional version = default; - Optional label = default; - Optional isDefault = default; - Optional isActive = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("location")) @@ -38,6 +34,16 @@ internal static CloudServiceOSVersionData DeserializeCloudServiceOSVersionData(J location = new AzureLocation(property.Value.GetString()); continue; } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = OSVersionProperties.DeserializeOSVersionProperties(property.Value); + continue; + } if (property.NameEquals("id")) { id = new ResourceIdentifier(property.Value.GetString()); @@ -63,60 +69,8 @@ internal static CloudServiceOSVersionData DeserializeCloudServiceOSVersionData(J systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("family")) - { - family = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("familyLabel")) - { - familyLabel = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("version")) - { - version = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("label")) - { - label = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("isDefault")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - isDefault = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("isActive")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - isActive = property0.Value.GetBoolean(); - continue; - } - } - continue; - } } - return new CloudServiceOSVersionData(id, name, type, systemData.Value, Optional.ToNullable(location), family.Value, familyLabel.Value, version.Value, label.Value, Optional.ToNullable(isDefault), Optional.ToNullable(isActive)); + return new CloudServiceOSVersionData(id, name, type, systemData.Value, Optional.ToNullable(location), properties.Value); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceProperties.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceProperties.Serialization.cs new file mode 100644 index 000000000000..e57241796b52 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceProperties.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Models +{ + public partial class CloudServiceProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(PackageUri)) + { + writer.WritePropertyName("packageUrl"); + writer.WriteStringValue(PackageUri.AbsoluteUri); + } + if (Optional.IsDefined(Configuration)) + { + writer.WritePropertyName("configuration"); + writer.WriteStringValue(Configuration); + } + if (Optional.IsDefined(ConfigurationUri)) + { + writer.WritePropertyName("configurationUrl"); + writer.WriteStringValue(ConfigurationUri.AbsoluteUri); + } + if (Optional.IsDefined(StartCloudService)) + { + writer.WritePropertyName("startCloudService"); + writer.WriteBooleanValue(StartCloudService.Value); + } + if (Optional.IsDefined(AllowModelOverride)) + { + writer.WritePropertyName("allowModelOverride"); + writer.WriteBooleanValue(AllowModelOverride.Value); + } + if (Optional.IsDefined(UpgradeMode)) + { + writer.WritePropertyName("upgradeMode"); + writer.WriteStringValue(UpgradeMode.Value.ToString()); + } + if (Optional.IsDefined(RoleProfile)) + { + writer.WritePropertyName("roleProfile"); + writer.WriteObjectValue(RoleProfile); + } + if (Optional.IsDefined(OSProfile)) + { + writer.WritePropertyName("osProfile"); + writer.WriteObjectValue(OSProfile); + } + if (Optional.IsDefined(NetworkProfile)) + { + writer.WritePropertyName("networkProfile"); + writer.WriteObjectValue(NetworkProfile); + } + if (Optional.IsDefined(ExtensionProfile)) + { + writer.WritePropertyName("extensionProfile"); + writer.WriteObjectValue(ExtensionProfile); + } + writer.WriteEndObject(); + } + + internal static CloudServiceProperties DeserializeCloudServiceProperties(JsonElement element) + { + Optional packageUrl = default; + Optional configuration = default; + Optional configurationUrl = default; + Optional startCloudService = default; + Optional allowModelOverride = default; + Optional upgradeMode = default; + Optional roleProfile = default; + Optional osProfile = default; + Optional networkProfile = default; + Optional extensionProfile = default; + Optional provisioningState = default; + Optional uniqueId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("packageUrl")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + packageUrl = null; + continue; + } + packageUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("configuration")) + { + configuration = property.Value.GetString(); + continue; + } + if (property.NameEquals("configurationUrl")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + configurationUrl = null; + continue; + } + configurationUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("startCloudService")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + startCloudService = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("allowModelOverride")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + allowModelOverride = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("upgradeMode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + upgradeMode = new CloudServiceUpgradeMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("roleProfile")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + roleProfile = CloudServiceRoleProfile.DeserializeCloudServiceRoleProfile(property.Value); + continue; + } + if (property.NameEquals("osProfile")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + osProfile = CloudServiceOSProfile.DeserializeCloudServiceOSProfile(property.Value); + continue; + } + if (property.NameEquals("networkProfile")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + networkProfile = CloudServiceNetworkProfile.DeserializeCloudServiceNetworkProfile(property.Value); + continue; + } + if (property.NameEquals("extensionProfile")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + extensionProfile = CloudServiceExtensionProfile.DeserializeCloudServiceExtensionProfile(property.Value); + continue; + } + if (property.NameEquals("provisioningState")) + { + provisioningState = property.Value.GetString(); + continue; + } + if (property.NameEquals("uniqueId")) + { + uniqueId = property.Value.GetString(); + continue; + } + } + return new CloudServiceProperties(packageUrl.Value, configuration.Value, configurationUrl.Value, Optional.ToNullable(startCloudService), Optional.ToNullable(allowModelOverride), Optional.ToNullable(upgradeMode), roleProfile.Value, osProfile.Value, networkProfile.Value, extensionProfile.Value, provisioningState.Value, uniqueId.Value); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceProperties.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceProperties.cs new file mode 100644 index 000000000000..16d214dab7af --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceProperties.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Compute.Models +{ + /// Cloud service properties. + public partial class CloudServiceProperties + { + /// Initializes a new instance of CloudServiceProperties. + public CloudServiceProperties() + { + } + + /// Initializes a new instance of CloudServiceProperties. + /// + /// Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. + /// This is a write-only property and is not returned in GET calls. + /// + /// Specifies the XML service configuration (.cscfg) for the cloud service. + /// + /// Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. + /// This is a write-only property and is not returned in GET calls. + /// + /// + /// (Optional) Indicates whether to start the cloud service immediately after it is created. The default value is `true`. + /// If false, the service model is still deployed, but the code is not run immediately. Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service still incurs charges, even if it is poweredoff. + /// + /// + /// (Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override the role instance count and vm size specified in the .cscfg and .csdef respectively. + /// The default value is `false`. + /// + /// + /// Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. + /// Possible Values are <br /><br />**Auto**<br /><br />**Manual** <br /><br />**Simultaneous**<br /><br /> + /// If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. + /// + /// Describes the role profile for the cloud service. + /// Describes the OS profile for the cloud service. + /// Network Profile for the cloud service. + /// Describes a cloud service extension profile. + /// The provisioning state, which only appears in the response. + /// The unique identifier for the cloud service. + internal CloudServiceProperties(Uri packageUri, string configuration, Uri configurationUri, bool? startCloudService, bool? allowModelOverride, CloudServiceUpgradeMode? upgradeMode, CloudServiceRoleProfile roleProfile, CloudServiceOSProfile osProfile, CloudServiceNetworkProfile networkProfile, CloudServiceExtensionProfile extensionProfile, string provisioningState, string uniqueId) + { + PackageUri = packageUri; + Configuration = configuration; + ConfigurationUri = configurationUri; + StartCloudService = startCloudService; + AllowModelOverride = allowModelOverride; + UpgradeMode = upgradeMode; + RoleProfile = roleProfile; + OSProfile = osProfile; + NetworkProfile = networkProfile; + ExtensionProfile = extensionProfile; + ProvisioningState = provisioningState; + UniqueId = uniqueId; + } + + /// + /// Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. + /// This is a write-only property and is not returned in GET calls. + /// + public Uri PackageUri { get; set; } + /// Specifies the XML service configuration (.cscfg) for the cloud service. + public string Configuration { get; set; } + /// + /// Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. + /// This is a write-only property and is not returned in GET calls. + /// + public Uri ConfigurationUri { get; set; } + /// + /// (Optional) Indicates whether to start the cloud service immediately after it is created. The default value is `true`. + /// If false, the service model is still deployed, but the code is not run immediately. Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service still incurs charges, even if it is poweredoff. + /// + public bool? StartCloudService { get; set; } + /// + /// (Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override the role instance count and vm size specified in the .cscfg and .csdef respectively. + /// The default value is `false`. + /// + public bool? AllowModelOverride { get; set; } + /// + /// Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. + /// Possible Values are <br /><br />**Auto**<br /><br />**Manual** <br /><br />**Simultaneous**<br /><br /> + /// If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. + /// + public CloudServiceUpgradeMode? UpgradeMode { get; set; } + /// Describes the role profile for the cloud service. + internal CloudServiceRoleProfile RoleProfile { get; set; } + /// List of roles for the cloud service. + public IList Roles + { + get + { + if (RoleProfile is null) + RoleProfile = new CloudServiceRoleProfile(); + return RoleProfile.Roles; + } + } + + /// Describes the OS profile for the cloud service. + internal CloudServiceOSProfile OSProfile { get; set; } + /// Specifies set of certificates that should be installed onto the role instances. + public IList OSSecrets + { + get + { + if (OSProfile is null) + OSProfile = new CloudServiceOSProfile(); + return OSProfile.Secrets; + } + } + + /// Network Profile for the cloud service. + public CloudServiceNetworkProfile NetworkProfile { get; set; } + /// Describes a cloud service extension profile. + internal CloudServiceExtensionProfile ExtensionProfile { get; set; } + /// List of extensions for the cloud service. + public IList Extensions + { + get + { + if (ExtensionProfile is null) + ExtensionProfile = new CloudServiceExtensionProfile(); + return ExtensionProfile.Extensions; + } + } + + /// The provisioning state, which only appears in the response. + public string ProvisioningState { get; } + /// The unique identifier for the cloud service. + public string UniqueId { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleData.Serialization.cs index 6fdee8274749..7c583123cbfb 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleData.Serialization.cs @@ -18,11 +18,11 @@ internal static CloudServiceRoleData DeserializeCloudServiceRoleData(JsonElement { Optional location = default; Optional sku = default; + Optional properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; Optional systemData = default; - Optional uniqueId = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("location")) @@ -45,6 +45,16 @@ internal static CloudServiceRoleData DeserializeCloudServiceRoleData(JsonElement sku = CloudServiceRoleSku.DeserializeCloudServiceRoleSku(property.Value); continue; } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = CloudServiceRoleProperties.DeserializeCloudServiceRoleProperties(property.Value); + continue; + } if (property.NameEquals("id")) { id = new ResourceIdentifier(property.Value.GetString()); @@ -70,25 +80,8 @@ internal static CloudServiceRoleData DeserializeCloudServiceRoleData(JsonElement systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("uniqueId")) - { - uniqueId = property0.Value.GetString(); - continue; - } - } - continue; - } } - return new CloudServiceRoleData(id, name, type, systemData.Value, Optional.ToNullable(location), sku.Value, uniqueId.Value); + return new CloudServiceRoleData(id, name, type, systemData.Value, Optional.ToNullable(location), sku.Value, properties.Value); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleInstanceData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleInstanceData.Serialization.cs index 2c13d74fd64c..de1c420c5a55 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleInstanceData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleInstanceData.Serialization.cs @@ -20,12 +20,11 @@ internal static CloudServiceRoleInstanceData DeserializeCloudServiceRoleInstance Optional location = default; Optional> tags = default; Optional sku = default; + Optional properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; Optional systemData = default; - Optional networkProfile = default; - Optional instanceView = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("location")) @@ -63,6 +62,16 @@ internal static CloudServiceRoleInstanceData DeserializeCloudServiceRoleInstance sku = InstanceSku.DeserializeInstanceSku(property.Value); continue; } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = RoleInstanceProperties.DeserializeRoleInstanceProperties(property.Value); + continue; + } if (property.NameEquals("id")) { id = new ResourceIdentifier(property.Value.GetString()); @@ -88,40 +97,8 @@ internal static CloudServiceRoleInstanceData DeserializeCloudServiceRoleInstance systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("networkProfile")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - networkProfile = RoleInstanceNetworkProfile.DeserializeRoleInstanceNetworkProfile(property0.Value); - continue; - } - if (property0.NameEquals("instanceView")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - instanceView = RoleInstanceView.DeserializeRoleInstanceView(property0.Value); - continue; - } - } - continue; - } } - return new CloudServiceRoleInstanceData(id, name, type, systemData.Value, Optional.ToNullable(location), Optional.ToDictionary(tags), sku.Value, networkProfile.Value, instanceView.Value); + return new CloudServiceRoleInstanceData(id, name, type, systemData.Value, Optional.ToNullable(location), Optional.ToDictionary(tags), sku.Value, properties.Value); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleProperties.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleProperties.Serialization.cs new file mode 100644 index 000000000000..f046a7d5d0bc --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleProperties.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Models +{ + internal partial class CloudServiceRoleProperties + { + internal static CloudServiceRoleProperties DeserializeCloudServiceRoleProperties(JsonElement element) + { + Optional uniqueId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("uniqueId")) + { + uniqueId = property.Value.GetString(); + continue; + } + } + return new CloudServiceRoleProperties(uniqueId.Value); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleProperties.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleProperties.cs new file mode 100644 index 000000000000..9128ec1aa30c --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Compute.Models +{ + /// The cloud service role properties. + internal partial class CloudServiceRoleProperties + { + /// Initializes a new instance of CloudServiceRoleProperties. + internal CloudServiceRoleProperties() + { + } + + /// Initializes a new instance of CloudServiceRoleProperties. + /// Specifies the ID which uniquely identifies a cloud service role. + internal CloudServiceRoleProperties(string uniqueId) + { + UniqueId = uniqueId; + } + + /// Specifies the ID which uniquely identifies a cloud service role. + public string UniqueId { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDeprecationStatus.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDeprecationStatus.Serialization.cs new file mode 100644 index 000000000000..0575f4f24dd4 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDeprecationStatus.Serialization.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Models +{ + public partial class ImageDeprecationStatus : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ImageState)) + { + writer.WritePropertyName("imageState"); + writer.WriteStringValue(ImageState.Value.ToString()); + } + if (Optional.IsDefined(ScheduledDeprecationOn)) + { + writer.WritePropertyName("scheduledDeprecationTime"); + writer.WriteStringValue(ScheduledDeprecationOn.Value, "O"); + } + if (Optional.IsDefined(AlternativeOption)) + { + writer.WritePropertyName("alternativeOption"); + writer.WriteObjectValue(AlternativeOption); + } + writer.WriteEndObject(); + } + + internal static ImageDeprecationStatus DeserializeImageDeprecationStatus(JsonElement element) + { + Optional imageState = default; + Optional scheduledDeprecationTime = default; + Optional alternativeOption = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("imageState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + imageState = new ImageState(property.Value.GetString()); + continue; + } + if (property.NameEquals("scheduledDeprecationTime")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + scheduledDeprecationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("alternativeOption")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + alternativeOption = AlternativeOption.DeserializeAlternativeOption(property.Value); + continue; + } + } + return new ImageDeprecationStatus(Optional.ToNullable(imageState), Optional.ToNullable(scheduledDeprecationTime), alternativeOption.Value); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDeprecationStatus.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDeprecationStatus.cs new file mode 100644 index 000000000000..f0b431d26bb6 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDeprecationStatus.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.Compute.Models +{ + /// Describes image deprecation status properties on the image. + public partial class ImageDeprecationStatus + { + /// Initializes a new instance of ImageDeprecationStatus. + public ImageDeprecationStatus() + { + } + + /// Initializes a new instance of ImageDeprecationStatus. + /// Describes the state of the image. + /// The time, in future, at which this image will be marked as deprecated. This scheduled time is chosen by the Publisher. + /// Describes the alternative option specified by the Publisher for this image when this image is deprecated. + internal ImageDeprecationStatus(ImageState? imageState, DateTimeOffset? scheduledDeprecationOn, AlternativeOption alternativeOption) + { + ImageState = imageState; + ScheduledDeprecationOn = scheduledDeprecationOn; + AlternativeOption = alternativeOption; + } + + /// Describes the state of the image. + public ImageState? ImageState { get; set; } + /// The time, in future, at which this image will be marked as deprecated. This scheduled time is chosen by the Publisher. + public DateTimeOffset? ScheduledDeprecationOn { get; set; } + /// Describes the alternative option specified by the Publisher for this image when this image is deprecated. + public AlternativeOption AlternativeOption { get; set; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageState.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageState.cs new file mode 100644 index 000000000000..6a658cef3e7e --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Compute.Models +{ + /// Describes the state of the image. + public readonly partial struct ImageState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ImageState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string ScheduledForDeprecationValue = "ScheduledForDeprecation"; + private const string DeprecatedValue = "Deprecated"; + + /// Active. + public static ImageState Active { get; } = new ImageState(ActiveValue); + /// ScheduledForDeprecation. + public static ImageState ScheduledForDeprecation { get; } = new ImageState(ScheduledForDeprecationValue); + /// Deprecated. + public static ImageState Deprecated { get; } = new ImageState(DeprecatedValue); + /// Determines if two values are the same. + public static bool operator ==(ImageState left, ImageState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ImageState left, ImageState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ImageState(string value) => new ImageState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ImageState other && Equals(other); + /// + public bool Equals(ImageState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerConfigurationProperties.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerConfigurationProperties.Serialization.cs new file mode 100644 index 000000000000..42bb45f6673c --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerConfigurationProperties.Serialization.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Models +{ + public partial class LoadBalancerConfigurationProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("frontendIpConfigurations"); + writer.WriteStartArray(); + foreach (var item in FrontendIPConfigurations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + internal static LoadBalancerConfigurationProperties DeserializeLoadBalancerConfigurationProperties(JsonElement element) + { + IList frontendIPConfigurations = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("frontendIpConfigurations")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LoadBalancerFrontendIPConfiguration.DeserializeLoadBalancerFrontendIPConfiguration(item)); + } + frontendIPConfigurations = array; + continue; + } + } + return new LoadBalancerConfigurationProperties(frontendIPConfigurations); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerConfigurationProperties.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerConfigurationProperties.cs new file mode 100644 index 000000000000..d6f243e91451 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerConfigurationProperties.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Models +{ + /// Describes the properties of the load balancer configuration. + public partial class LoadBalancerConfigurationProperties + { + /// Initializes a new instance of LoadBalancerConfigurationProperties. + /// Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration. + /// is null. + public LoadBalancerConfigurationProperties(IEnumerable frontendIPConfigurations) + { + Argument.AssertNotNull(frontendIPConfigurations, nameof(frontendIPConfigurations)); + + FrontendIPConfigurations = frontendIPConfigurations.ToList(); + } + + /// Initializes a new instance of LoadBalancerConfigurationProperties. + /// Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration. + internal LoadBalancerConfigurationProperties(IList frontendIPConfigurations) + { + FrontendIPConfigurations = frontendIPConfigurations; + } + + /// Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration. + public IList FrontendIPConfigurations { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfiguration.Serialization.cs index c11d99144292..986671e1518a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfiguration.Serialization.cs @@ -7,7 +7,6 @@ using System.Text.Json; using Azure.Core; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Compute.Models { @@ -19,32 +18,14 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("name"); writer.WriteStringValue(Name); writer.WritePropertyName("properties"); - writer.WriteStartObject(); - if (Optional.IsDefined(PublicIPAddress)) - { - writer.WritePropertyName("publicIPAddress"); - JsonSerializer.Serialize(writer, PublicIPAddress); - } - if (Optional.IsDefined(Subnet)) - { - writer.WritePropertyName("subnet"); - JsonSerializer.Serialize(writer, Subnet); - } - if (Optional.IsDefined(PrivateIPAddress)) - { - writer.WritePropertyName("privateIPAddress"); - writer.WriteStringValue(PrivateIPAddress); - } - writer.WriteEndObject(); + writer.WriteObjectValue(Properties); writer.WriteEndObject(); } internal static LoadBalancerFrontendIPConfiguration DeserializeLoadBalancerFrontendIPConfiguration(JsonElement element) { string name = default; - Optional publicIPAddress = default; - Optional subnet = default; - Optional privateIPAddress = default; + LoadBalancerFrontendIPConfigurationProperties properties = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name")) @@ -54,43 +35,11 @@ internal static LoadBalancerFrontendIPConfiguration DeserializeLoadBalancerFront } if (property.NameEquals("properties")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("publicIPAddress")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - publicIPAddress = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("subnet")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - subnet = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("privateIPAddress")) - { - privateIPAddress = property0.Value.GetString(); - continue; - } - } + properties = LoadBalancerFrontendIPConfigurationProperties.DeserializeLoadBalancerFrontendIPConfigurationProperties(property.Value); continue; } } - return new LoadBalancerFrontendIPConfiguration(name, publicIPAddress, subnet, privateIPAddress.Value); + return new LoadBalancerFrontendIPConfiguration(name, properties); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfiguration.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfiguration.cs index def6d5edaf4c..aec7c1bc12c0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfiguration.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfiguration.cs @@ -7,7 +7,6 @@ using System; using Azure.Core; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Compute.Models { @@ -16,58 +15,20 @@ public partial class LoadBalancerFrontendIPConfiguration { /// Initializes a new instance of LoadBalancerFrontendIPConfiguration. /// The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource. - /// is null. - public LoadBalancerFrontendIPConfiguration(string name) + /// Properties of load balancer frontend ip configuration. + /// or is null. + public LoadBalancerFrontendIPConfiguration(string name, LoadBalancerFrontendIPConfigurationProperties properties) { Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(properties, nameof(properties)); Name = name; - } - - /// Initializes a new instance of LoadBalancerFrontendIPConfiguration. - /// The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource. - /// The reference to the public ip address resource. - /// The reference to the virtual network subnet resource. - /// The virtual network private IP address of the IP configuration. - internal LoadBalancerFrontendIPConfiguration(string name, WritableSubResource publicIPAddress, WritableSubResource subnet, string privateIPAddress) - { - Name = name; - PublicIPAddress = publicIPAddress; - Subnet = subnet; - PrivateIPAddress = privateIPAddress; + Properties = properties; } /// The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource. public string Name { get; set; } - /// The reference to the public ip address resource. - internal WritableSubResource PublicIPAddress { get; set; } - /// Gets or sets Id. - public ResourceIdentifier PublicIPAddressId - { - get => PublicIPAddress is null ? default : PublicIPAddress.Id; - set - { - if (PublicIPAddress is null) - PublicIPAddress = new WritableSubResource(); - PublicIPAddress.Id = value; - } - } - - /// The reference to the virtual network subnet resource. - internal WritableSubResource Subnet { get; set; } - /// Gets or sets Id. - public ResourceIdentifier SubnetId - { - get => Subnet is null ? default : Subnet.Id; - set - { - if (Subnet is null) - Subnet = new WritableSubResource(); - Subnet.Id = value; - } - } - - /// The virtual network private IP address of the IP configuration. - public string PrivateIPAddress { get; set; } + /// Properties of load balancer frontend ip configuration. + public LoadBalancerFrontendIPConfigurationProperties Properties { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfigurationProperties.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfigurationProperties.Serialization.cs new file mode 100644 index 000000000000..431aab9b9d50 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfigurationProperties.Serialization.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Compute.Models +{ + public partial class LoadBalancerFrontendIPConfigurationProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(PublicIPAddress)) + { + writer.WritePropertyName("publicIPAddress"); + JsonSerializer.Serialize(writer, PublicIPAddress); + } + if (Optional.IsDefined(Subnet)) + { + writer.WritePropertyName("subnet"); + JsonSerializer.Serialize(writer, Subnet); + } + if (Optional.IsDefined(PrivateIPAddress)) + { + writer.WritePropertyName("privateIPAddress"); + writer.WriteStringValue(PrivateIPAddress); + } + writer.WriteEndObject(); + } + + internal static LoadBalancerFrontendIPConfigurationProperties DeserializeLoadBalancerFrontendIPConfigurationProperties(JsonElement element) + { + Optional publicIPAddress = default; + Optional subnet = default; + Optional privateIPAddress = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publicIPAddress")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + publicIPAddress = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("subnet")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + subnet = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("privateIPAddress")) + { + privateIPAddress = property.Value.GetString(); + continue; + } + } + return new LoadBalancerFrontendIPConfigurationProperties(publicIPAddress, subnet, privateIPAddress.Value); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfigurationProperties.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfigurationProperties.cs new file mode 100644 index 000000000000..53278a19623f --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfigurationProperties.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Compute.Models +{ + /// Describes a cloud service IP Configuration. + public partial class LoadBalancerFrontendIPConfigurationProperties + { + /// Initializes a new instance of LoadBalancerFrontendIPConfigurationProperties. + public LoadBalancerFrontendIPConfigurationProperties() + { + } + + /// Initializes a new instance of LoadBalancerFrontendIPConfigurationProperties. + /// The reference to the public ip address resource. + /// The reference to the virtual network subnet resource. + /// The virtual network private IP address of the IP configuration. + internal LoadBalancerFrontendIPConfigurationProperties(WritableSubResource publicIPAddress, WritableSubResource subnet, string privateIPAddress) + { + PublicIPAddress = publicIPAddress; + Subnet = subnet; + PrivateIPAddress = privateIPAddress; + } + + /// The reference to the public ip address resource. + internal WritableSubResource PublicIPAddress { get; set; } + /// Gets or sets Id. + public ResourceIdentifier PublicIPAddressId + { + get => PublicIPAddress is null ? default : PublicIPAddress.Id; + set + { + if (PublicIPAddress is null) + PublicIPAddress = new WritableSubResource(); + PublicIPAddress.Id = value; + } + } + + /// The reference to the virtual network subnet resource. + internal WritableSubResource Subnet { get; set; } + /// Gets or sets Id. + public ResourceIdentifier SubnetId + { + get => Subnet is null ? default : Subnet.Id; + set + { + if (Subnet is null) + Subnet = new WritableSubResource(); + Subnet.Id = value; + } + } + + /// The virtual network private IP address of the IP configuration. + public string PrivateIPAddress { get; set; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSFamilyProperties.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSFamilyProperties.Serialization.cs new file mode 100644 index 000000000000..c82a29bbcef9 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSFamilyProperties.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Models +{ + public partial class OSFamilyProperties + { + internal static OSFamilyProperties DeserializeOSFamilyProperties(JsonElement element) + { + Optional name = default; + Optional label = default; + Optional> versions = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("label")) + { + label = property.Value.GetString(); + continue; + } + if (property.NameEquals("versions")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OSVersionPropertiesBase.DeserializeOSVersionPropertiesBase(item)); + } + versions = array; + continue; + } + } + return new OSFamilyProperties(name.Value, label.Value, Optional.ToList(versions)); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSFamilyProperties.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSFamilyProperties.cs new file mode 100644 index 000000000000..86b60da97cf5 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSFamilyProperties.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Models +{ + /// OS family properties. + public partial class OSFamilyProperties + { + /// Initializes a new instance of OSFamilyProperties. + internal OSFamilyProperties() + { + Versions = new ChangeTrackingList(); + } + + /// Initializes a new instance of OSFamilyProperties. + /// The OS family name. + /// The OS family label. + /// List of OS versions belonging to this family. + internal OSFamilyProperties(string name, string label, IReadOnlyList versions) + { + Name = name; + Label = label; + Versions = versions; + } + + /// The OS family name. + public string Name { get; } + /// The OS family label. + public string Label { get; } + /// List of OS versions belonging to this family. + public IReadOnlyList Versions { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSImageNotificationProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSImageNotificationProfile.Serialization.cs new file mode 100644 index 000000000000..06a194f64525 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSImageNotificationProfile.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Models +{ + public partial class OSImageNotificationProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(NotBeforeTimeout)) + { + writer.WritePropertyName("notBeforeTimeout"); + writer.WriteStringValue(NotBeforeTimeout); + } + if (Optional.IsDefined(Enable)) + { + writer.WritePropertyName("enable"); + writer.WriteBooleanValue(Enable.Value); + } + writer.WriteEndObject(); + } + + internal static OSImageNotificationProfile DeserializeOSImageNotificationProfile(JsonElement element) + { + Optional notBeforeTimeout = default; + Optional enable = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("notBeforeTimeout")) + { + notBeforeTimeout = property.Value.GetString(); + continue; + } + if (property.NameEquals("enable")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + enable = property.Value.GetBoolean(); + continue; + } + } + return new OSImageNotificationProfile(notBeforeTimeout.Value, Optional.ToNullable(enable)); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSImageNotificationProfile.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSImageNotificationProfile.cs new file mode 100644 index 000000000000..264b640ab101 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSImageNotificationProfile.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Compute.Models +{ + /// The OSImageNotificationProfile. + public partial class OSImageNotificationProfile + { + /// Initializes a new instance of OSImageNotificationProfile. + public OSImageNotificationProfile() + { + } + + /// Initializes a new instance of OSImageNotificationProfile. + /// Length of time a Virtual Machine being reimaged or having its OS upgraded will have to potentially approve the OS Image Scheduled Event before the event is auto approved (timed out). The configuration is specified in ISO 8601 format, with the value set to 15 minutes (PT15M). + /// Specifies whether the OS Image Scheduled event is enabled or disabled. + internal OSImageNotificationProfile(string notBeforeTimeout, bool? enable) + { + NotBeforeTimeout = notBeforeTimeout; + Enable = enable; + } + + /// Length of time a Virtual Machine being reimaged or having its OS upgraded will have to potentially approve the OS Image Scheduled Event before the event is auto approved (timed out). The configuration is specified in ISO 8601 format, with the value set to 15 minutes (PT15M). + public string NotBeforeTimeout { get; set; } + /// Specifies whether the OS Image Scheduled event is enabled or disabled. + public bool? Enable { get; set; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSProfileProvisioningData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSProfileProvisioningData.Serialization.cs new file mode 100644 index 000000000000..75290ced6330 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSProfileProvisioningData.Serialization.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Models +{ + public partial class OSProfileProvisioningData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AdminPassword)) + { + writer.WritePropertyName("adminPassword"); + writer.WriteStringValue(AdminPassword); + } + if (Optional.IsDefined(CustomData)) + { + writer.WritePropertyName("customData"); + writer.WriteStringValue(CustomData); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSProfileProvisioningData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSProfileProvisioningData.cs new file mode 100644 index 000000000000..4e877f333887 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSProfileProvisioningData.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Compute.Models +{ + /// Additional parameters for Reimaging Non-Ephemeral Virtual Machine. + public partial class OSProfileProvisioningData + { + /// Initializes a new instance of OSProfileProvisioningData. + public OSProfileProvisioningData() + { + } + + /// Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection). + public string AdminPassword { get; set; } + /// Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. <br><br> **Note: Do not pass any secrets or passwords in customData property** <br><br> This property cannot be updated after the VM is created. <br><br> customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/) <br><br> For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). + public string CustomData { get; set; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSVersionProperties.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSVersionProperties.Serialization.cs new file mode 100644 index 000000000000..be099dc7fc6d --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSVersionProperties.Serialization.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Models +{ + public partial class OSVersionProperties + { + internal static OSVersionProperties DeserializeOSVersionProperties(JsonElement element) + { + Optional family = default; + Optional familyLabel = default; + Optional version = default; + Optional label = default; + Optional isDefault = default; + Optional isActive = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("family")) + { + family = property.Value.GetString(); + continue; + } + if (property.NameEquals("familyLabel")) + { + familyLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("label")) + { + label = property.Value.GetString(); + continue; + } + if (property.NameEquals("isDefault")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isDefault = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isActive")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isActive = property.Value.GetBoolean(); + continue; + } + } + return new OSVersionProperties(family.Value, familyLabel.Value, version.Value, label.Value, Optional.ToNullable(isDefault), Optional.ToNullable(isActive)); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSVersionProperties.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSVersionProperties.cs new file mode 100644 index 000000000000..5ac7519e8329 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSVersionProperties.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Compute.Models +{ + /// OS version properties. + public partial class OSVersionProperties + { + /// Initializes a new instance of OSVersionProperties. + internal OSVersionProperties() + { + } + + /// Initializes a new instance of OSVersionProperties. + /// The family of this OS version. + /// The family label of this OS version. + /// The OS version. + /// The OS version label. + /// Specifies whether this is the default OS version for its family. + /// Specifies whether this OS version is active. + internal OSVersionProperties(string family, string familyLabel, string version, string label, bool? isDefault, bool? isActive) + { + Family = family; + FamilyLabel = familyLabel; + Version = version; + Label = label; + IsDefault = isDefault; + IsActive = isActive; + } + + /// The family of this OS version. + public string Family { get; } + /// The family label of this OS version. + public string FamilyLabel { get; } + /// The OS version. + public string Version { get; } + /// The OS version label. + public string Label { get; } + /// Specifies whether this is the default OS version for its family. + public bool? IsDefault { get; } + /// Specifies whether this OS version is active. + public bool? IsActive { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.Serialization.cs index 91d24ec68e2e..64802f739d23 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.Serialization.cs @@ -22,6 +22,7 @@ internal static RestorePointSourceMetadata DeserializeRestorePointSourceMetadata Optional vmId = default; Optional securityProfile = default; Optional location = default; + Optional userData = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("hardwareProfile")) @@ -94,8 +95,13 @@ internal static RestorePointSourceMetadata DeserializeRestorePointSourceMetadata location = new AzureLocation(property.Value.GetString()); continue; } + if (property.NameEquals("userData")) + { + userData = property.Value.GetString(); + continue; + } } - return new RestorePointSourceMetadata(hardwareProfile.Value, storageProfile.Value, osProfile.Value, diagnosticsProfile.Value, licenseType.Value, vmId.Value, securityProfile.Value, Optional.ToNullable(location)); + return new RestorePointSourceMetadata(hardwareProfile.Value, storageProfile.Value, osProfile.Value, diagnosticsProfile.Value, licenseType.Value, vmId.Value, securityProfile.Value, Optional.ToNullable(location), userData.Value); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.cs index 79caf82f620b..1681eed9e5fe 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.cs @@ -26,7 +26,8 @@ internal RestorePointSourceMetadata() /// Gets the virtual machine unique id. /// Gets the security profile. /// Location of the VM from which the restore point was created. - internal RestorePointSourceMetadata(VirtualMachineHardwareProfile hardwareProfile, RestorePointSourceVmStorageProfile storageProfile, VirtualMachineOSProfile osProfile, DiagnosticsProfile diagnosticsProfile, string licenseType, string vmId, SecurityProfile securityProfile, AzureLocation? location) + /// UserData associated with the source VM for which restore point is captured, which is a base-64 encoded value. + internal RestorePointSourceMetadata(VirtualMachineHardwareProfile hardwareProfile, RestorePointSourceVmStorageProfile storageProfile, VirtualMachineOSProfile osProfile, DiagnosticsProfile diagnosticsProfile, string licenseType, string vmId, SecurityProfile securityProfile, AzureLocation? location, string userData) { HardwareProfile = hardwareProfile; StorageProfile = storageProfile; @@ -36,6 +37,7 @@ internal RestorePointSourceMetadata(VirtualMachineHardwareProfile hardwareProfil VmId = vmId; SecurityProfile = securityProfile; Location = location; + UserData = userData; } /// Gets the hardware profile. @@ -60,5 +62,7 @@ public BootDiagnostics BootDiagnostics public SecurityProfile SecurityProfile { get; } /// Location of the VM from which the restore point was created. public AzureLocation? Location { get; } + /// UserData associated with the source VM for which restore point is captured, which is a base-64 encoded value. + public string UserData { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceProperties.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceProperties.Serialization.cs new file mode 100644 index 000000000000..eb9dae0a04f6 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceProperties.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Models +{ + public partial class RoleInstanceProperties + { + internal static RoleInstanceProperties DeserializeRoleInstanceProperties(JsonElement element) + { + Optional networkProfile = default; + Optional instanceView = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("networkProfile")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + networkProfile = RoleInstanceNetworkProfile.DeserializeRoleInstanceNetworkProfile(property.Value); + continue; + } + if (property.NameEquals("instanceView")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + instanceView = RoleInstanceView.DeserializeRoleInstanceView(property.Value); + continue; + } + } + return new RoleInstanceProperties(networkProfile.Value, instanceView.Value); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceProperties.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceProperties.cs new file mode 100644 index 000000000000..4ff940085eb2 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceProperties.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Compute.Models +{ + /// Role instance properties. + public partial class RoleInstanceProperties + { + /// Initializes a new instance of RoleInstanceProperties. + internal RoleInstanceProperties() + { + } + + /// Initializes a new instance of RoleInstanceProperties. + /// Describes the network profile for the role instance. + /// The instance view of the role instance. + internal RoleInstanceProperties(RoleInstanceNetworkProfile networkProfile, RoleInstanceView instanceView) + { + NetworkProfile = networkProfile; + InstanceView = instanceView; + } + + /// Describes the network profile for the role instance. + internal RoleInstanceNetworkProfile NetworkProfile { get; } + /// Specifies the list of resource Ids for the network interfaces associated with the role instance. + public IReadOnlyList NetworkInterfaces + { + get => NetworkProfile?.NetworkInterfaces; + } + + /// The instance view of the role instance. + public RoleInstanceView InstanceView { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradePolicy.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradePolicy.Serialization.cs index 577a70ca704a..22fa695a0b9a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradePolicy.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradePolicy.Serialization.cs @@ -45,6 +45,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("prioritizeUnhealthyInstances"); writer.WriteBooleanValue(PrioritizeUnhealthyInstances.Value); } + if (Optional.IsDefined(RollbackFailedInstancesOnPolicyBreach)) + { + writer.WritePropertyName("rollbackFailedInstancesOnPolicyBreach"); + writer.WriteBooleanValue(RollbackFailedInstancesOnPolicyBreach.Value); + } + if (Optional.IsDefined(MaxSurge)) + { + writer.WritePropertyName("maxSurge"); + writer.WriteBooleanValue(MaxSurge.Value); + } writer.WriteEndObject(); } @@ -56,6 +66,8 @@ internal static RollingUpgradePolicy DeserializeRollingUpgradePolicy(JsonElement Optional pauseTimeBetweenBatches = default; Optional enableCrossZoneUpgrade = default; Optional prioritizeUnhealthyInstances = default; + Optional rollbackFailedInstancesOnPolicyBreach = default; + Optional maxSurge = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("maxBatchInstancePercent")) @@ -113,8 +125,28 @@ internal static RollingUpgradePolicy DeserializeRollingUpgradePolicy(JsonElement prioritizeUnhealthyInstances = property.Value.GetBoolean(); continue; } + if (property.NameEquals("rollbackFailedInstancesOnPolicyBreach")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + rollbackFailedInstancesOnPolicyBreach = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("maxSurge")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxSurge = property.Value.GetBoolean(); + continue; + } } - return new RollingUpgradePolicy(Optional.ToNullable(maxBatchInstancePercent), Optional.ToNullable(maxUnhealthyInstancePercent), Optional.ToNullable(maxUnhealthyUpgradedInstancePercent), pauseTimeBetweenBatches.Value, Optional.ToNullable(enableCrossZoneUpgrade), Optional.ToNullable(prioritizeUnhealthyInstances)); + return new RollingUpgradePolicy(Optional.ToNullable(maxBatchInstancePercent), Optional.ToNullable(maxUnhealthyInstancePercent), Optional.ToNullable(maxUnhealthyUpgradedInstancePercent), pauseTimeBetweenBatches.Value, Optional.ToNullable(enableCrossZoneUpgrade), Optional.ToNullable(prioritizeUnhealthyInstances), Optional.ToNullable(rollbackFailedInstancesOnPolicyBreach), Optional.ToNullable(maxSurge)); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradePolicy.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradePolicy.cs index 7e729013cc2d..0a86001eee4e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradePolicy.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradePolicy.cs @@ -22,7 +22,9 @@ public RollingUpgradePolicy() /// The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. The default value is 0 seconds (PT0S). /// Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size. /// Upgrade all unhealthy instances in a scale set before any healthy instances. - internal RollingUpgradePolicy(int? maxBatchInstancePercent, int? maxUnhealthyInstancePercent, int? maxUnhealthyUpgradedInstancePercent, string pauseTimeBetweenBatches, bool? enableCrossZoneUpgrade, bool? prioritizeUnhealthyInstances) + /// Rollback failed instances to previous model if the Rolling Upgrade policy is violated. + /// Create new virtual machines to upgrade the scale set, rather than updating the existing virtual machines. Existing virtual machines will be deleted once the new virtual machines are created for each batch. + internal RollingUpgradePolicy(int? maxBatchInstancePercent, int? maxUnhealthyInstancePercent, int? maxUnhealthyUpgradedInstancePercent, string pauseTimeBetweenBatches, bool? enableCrossZoneUpgrade, bool? prioritizeUnhealthyInstances, bool? rollbackFailedInstancesOnPolicyBreach, bool? maxSurge) { MaxBatchInstancePercent = maxBatchInstancePercent; MaxUnhealthyInstancePercent = maxUnhealthyInstancePercent; @@ -30,6 +32,8 @@ internal RollingUpgradePolicy(int? maxBatchInstancePercent, int? maxUnhealthyIns PauseTimeBetweenBatches = pauseTimeBetweenBatches; EnableCrossZoneUpgrade = enableCrossZoneUpgrade; PrioritizeUnhealthyInstances = prioritizeUnhealthyInstances; + RollbackFailedInstancesOnPolicyBreach = rollbackFailedInstancesOnPolicyBreach; + MaxSurge = maxSurge; } /// The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%. @@ -44,5 +48,9 @@ internal RollingUpgradePolicy(int? maxBatchInstancePercent, int? maxUnhealthyIns public bool? EnableCrossZoneUpgrade { get; set; } /// Upgrade all unhealthy instances in a scale set before any healthy instances. public bool? PrioritizeUnhealthyInstances { get; set; } + /// Rollback failed instances to previous model if the Rolling Upgrade policy is violated. + public bool? RollbackFailedInstancesOnPolicyBreach { get; set; } + /// Create new virtual machines to upgrade the scale set, rather than updating the existing virtual machines. Existing virtual machines will be deleted once the new virtual machines are created for each batch. + public bool? MaxSurge { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScheduledEventsProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScheduledEventsProfile.Serialization.cs index b6dd8e50667f..23befd3ba0ec 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScheduledEventsProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScheduledEventsProfile.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Compute.Models { - internal partial class ScheduledEventsProfile : IUtf8JsonSerializable + public partial class ScheduledEventsProfile : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -20,12 +20,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("terminateNotificationProfile"); writer.WriteObjectValue(TerminateNotificationProfile); } + if (Optional.IsDefined(OSImageNotificationProfile)) + { + writer.WritePropertyName("osImageNotificationProfile"); + writer.WriteObjectValue(OSImageNotificationProfile); + } writer.WriteEndObject(); } internal static ScheduledEventsProfile DeserializeScheduledEventsProfile(JsonElement element) { Optional terminateNotificationProfile = default; + Optional osImageNotificationProfile = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("terminateNotificationProfile")) @@ -38,8 +44,18 @@ internal static ScheduledEventsProfile DeserializeScheduledEventsProfile(JsonEle terminateNotificationProfile = TerminateNotificationProfile.DeserializeTerminateNotificationProfile(property.Value); continue; } + if (property.NameEquals("osImageNotificationProfile")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + osImageNotificationProfile = OSImageNotificationProfile.DeserializeOSImageNotificationProfile(property.Value); + continue; + } } - return new ScheduledEventsProfile(terminateNotificationProfile.Value); + return new ScheduledEventsProfile(terminateNotificationProfile.Value, osImageNotificationProfile.Value); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScheduledEventsProfile.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScheduledEventsProfile.cs index 71dd0c2ef041..5920857ff26d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScheduledEventsProfile.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScheduledEventsProfile.cs @@ -8,7 +8,7 @@ namespace Azure.ResourceManager.Compute.Models { /// The ScheduledEventsProfile. - internal partial class ScheduledEventsProfile + public partial class ScheduledEventsProfile { /// Initializes a new instance of ScheduledEventsProfile. public ScheduledEventsProfile() @@ -17,12 +17,16 @@ public ScheduledEventsProfile() /// Initializes a new instance of ScheduledEventsProfile. /// Specifies Terminate Scheduled Event related configurations. - internal ScheduledEventsProfile(TerminateNotificationProfile terminateNotificationProfile) + /// Specifies OS Image Scheduled Event related configurations. + internal ScheduledEventsProfile(TerminateNotificationProfile terminateNotificationProfile, OSImageNotificationProfile osImageNotificationProfile) { TerminateNotificationProfile = terminateNotificationProfile; + OSImageNotificationProfile = osImageNotificationProfile; } /// Specifies Terminate Scheduled Event related configurations. public TerminateNotificationProfile TerminateNotificationProfile { get; set; } + /// Specifies OS Image Scheduled Event related configurations. + public OSImageNotificationProfile OSImageNotificationProfile { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.Serialization.cs index dceb95f5a52f..6e4fb9eb1f24 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.Serialization.cs @@ -94,6 +94,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("architecture"); writer.WriteStringValue(Architecture.Value.ToString()); } + if (Optional.IsDefined(ImageDeprecationStatus)) + { + writer.WritePropertyName("imageDeprecationStatus"); + writer.WriteObjectValue(ImageDeprecationStatus); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -113,6 +118,7 @@ internal static VirtualMachineImage DeserializeVirtualMachineImage(JsonElement e Optional disallowed = default; Optional> features = default; Optional architecture = default; + Optional imageDeprecationStatus = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name")) @@ -259,11 +265,21 @@ internal static VirtualMachineImage DeserializeVirtualMachineImage(JsonElement e architecture = new ArchitectureType(property0.Value.GetString()); continue; } + if (property0.NameEquals("imageDeprecationStatus")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + imageDeprecationStatus = ImageDeprecationStatus.DeserializeImageDeprecationStatus(property0.Value); + continue; + } } continue; } } - return new VirtualMachineImage(id.Value, name, location, Optional.ToDictionary(tags), extendedLocation, plan.Value, osDiskImage.Value, Optional.ToList(dataDiskImages), automaticOSUpgradeProperties.Value, Optional.ToNullable(hyperVGeneration), disallowed.Value, Optional.ToList(features), Optional.ToNullable(architecture)); + return new VirtualMachineImage(id.Value, name, location, Optional.ToDictionary(tags), extendedLocation, plan.Value, osDiskImage.Value, Optional.ToList(dataDiskImages), automaticOSUpgradeProperties.Value, Optional.ToNullable(hyperVGeneration), disallowed.Value, Optional.ToList(features), Optional.ToNullable(architecture), imageDeprecationStatus.Value); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.cs index 2ff7d24893c4..f8ccbc6cb539 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.cs @@ -41,7 +41,8 @@ public VirtualMachineImage(string name, AzureLocation location) : base(name, loc /// Specifies disallowed configuration for the VirtualMachine created from the image. /// /// Specifies the Architecture Type. - internal VirtualMachineImage(ResourceIdentifier id, string name, AzureLocation location, IDictionary tags, ExtendedLocation extendedLocation, PurchasePlan plan, OSDiskImage osDiskImage, IList dataDiskImages, AutomaticOSUpgradeProperties automaticOSUpgradeProperties, HyperVGeneration? hyperVGeneration, DisallowedConfiguration disallowed, IList features, ArchitectureType? architecture) : base(id, name, location, tags, extendedLocation) + /// Describes image deprecation status properties on the image. + internal VirtualMachineImage(ResourceIdentifier id, string name, AzureLocation location, IDictionary tags, ExtendedLocation extendedLocation, PurchasePlan plan, OSDiskImage osDiskImage, IList dataDiskImages, AutomaticOSUpgradeProperties automaticOSUpgradeProperties, HyperVGeneration? hyperVGeneration, DisallowedConfiguration disallowed, IList features, ArchitectureType? architecture, ImageDeprecationStatus imageDeprecationStatus) : base(id, name, location, tags, extendedLocation) { Plan = plan; OSDiskImage = osDiskImage; @@ -51,6 +52,7 @@ internal VirtualMachineImage(ResourceIdentifier id, string name, AzureLocation l Disallowed = disallowed; Features = features; Architecture = architecture; + ImageDeprecationStatus = imageDeprecationStatus; } /// Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. @@ -101,5 +103,7 @@ public VirtualMachineDiskType? DisallowedVmDiskType public IList Features { get; } /// Specifies the Architecture Type. public ArchitectureType? Architecture { get; set; } + /// Describes image deprecation status properties on the image. + public ImageDeprecationStatus ImageDeprecationStatus { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePatch.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePatch.cs index 3146daffd977..a34492fead91 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePatch.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePatch.cs @@ -155,19 +155,7 @@ public ResourceIdentifier HostGroupId /// Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains.<br><li>This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set.<li>The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' &gt; 1.<li>This property cannot be updated once the Virtual Machine is created.<li>Fault domain assignment can be viewed in the Virtual Machine Instance View.<br><br>Minimum api‐version: 2020‐12‐01. public int? PlatformFaultDomain { get; set; } /// Specifies Scheduled Event related configurations. - internal ScheduledEventsProfile ScheduledEventsProfile { get; set; } - /// Specifies Terminate Scheduled Event related configurations. - public TerminateNotificationProfile ScheduledEventsTerminateNotificationProfile - { - get => ScheduledEventsProfile is null ? default : ScheduledEventsProfile.TerminateNotificationProfile; - set - { - if (ScheduledEventsProfile is null) - ScheduledEventsProfile = new ScheduledEventsProfile(); - ScheduledEventsProfile.TerminateNotificationProfile = value; - } - } - + public ScheduledEventsProfile ScheduledEventsProfile { get; set; } /// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. <br><br>Minimum api-version: 2021-03-01. public string UserData { get; set; } /// Specifies information about the capacity reservation that is used to allocate virtual machine. <br><br>Minimum api-version: 2021-04-01. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineReimageContent.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineReimageContent.Serialization.cs index 36a170282c81..538b3386ae16 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineReimageContent.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineReimageContent.Serialization.cs @@ -20,6 +20,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("tempDisk"); writer.WriteBooleanValue(TempDisk.Value); } + if (Optional.IsDefined(ExactVersion)) + { + writer.WritePropertyName("exactVersion"); + writer.WriteStringValue(ExactVersion); + } + if (Optional.IsDefined(OSProfile)) + { + writer.WritePropertyName("osProfile"); + writer.WriteObjectValue(OSProfile); + } writer.WriteEndObject(); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineReimageContent.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineReimageContent.cs index 8a6ffc0e657b..0667dc78689e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineReimageContent.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineReimageContent.cs @@ -17,5 +17,9 @@ public VirtualMachineReimageContent() /// Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk. public bool? TempDisk { get; set; } + /// Specifies in decimal number, the version the OS disk should be reimaged to. If exact version is not provided, the OS disk is reimaged to the existing version of OS Disk. + public string ExactVersion { get; set; } + /// Specifies information required for reimaging the non-ephemeral OS disk. + public OSProfileProvisioningData OSProfile { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetData.Serialization.cs index 0e6809a53f68..90bd0ce1c718 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetData.Serialization.cs @@ -140,6 +140,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("priorityMixPolicy"); writer.WriteObjectValue(PriorityMixPolicy); } + if (Optional.IsDefined(ConstrainedMaximumCapacity)) + { + writer.WritePropertyName("constrainedMaximumCapacity"); + writer.WriteBooleanValue(ConstrainedMaximumCapacity.Value); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -175,6 +180,7 @@ internal static VirtualMachineScaleSetData DeserializeVirtualMachineScaleSetData Optional spotRestorePolicy = default; Optional priorityMixPolicy = default; Optional timeCreated = default; + Optional constrainedMaximumCapacity = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("sku")) @@ -456,11 +462,21 @@ internal static VirtualMachineScaleSetData DeserializeVirtualMachineScaleSetData timeCreated = property0.Value.GetDateTimeOffset("O"); continue; } + if (property0.NameEquals("constrainedMaximumCapacity")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + constrainedMaximumCapacity = property0.Value.GetBoolean(); + continue; + } } continue; } } - return new VirtualMachineScaleSetData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku.Value, plan.Value, identity, Optional.ToList(zones), extendedLocation, upgradePolicy.Value, automaticRepairsPolicy.Value, virtualMachineProfile.Value, provisioningState.Value, Optional.ToNullable(overprovision), Optional.ToNullable(doNotRunExtensionsOnOverprovisionedVms), uniqueId.Value, Optional.ToNullable(singlePlacementGroup), Optional.ToNullable(zoneBalance), Optional.ToNullable(platformFaultDomainCount), proximityPlacementGroup, hostGroup, additionalCapabilities.Value, scaleInPolicy.Value, Optional.ToNullable(orchestrationMode), spotRestorePolicy.Value, priorityMixPolicy.Value, Optional.ToNullable(timeCreated)); + return new VirtualMachineScaleSetData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku.Value, plan.Value, identity, Optional.ToList(zones), extendedLocation, upgradePolicy.Value, automaticRepairsPolicy.Value, virtualMachineProfile.Value, provisioningState.Value, Optional.ToNullable(overprovision), Optional.ToNullable(doNotRunExtensionsOnOverprovisionedVms), uniqueId.Value, Optional.ToNullable(singlePlacementGroup), Optional.ToNullable(zoneBalance), Optional.ToNullable(platformFaultDomainCount), proximityPlacementGroup, hostGroup, additionalCapabilities.Value, scaleInPolicy.Value, Optional.ToNullable(orchestrationMode), spotRestorePolicy.Value, priorityMixPolicy.Value, Optional.ToNullable(timeCreated), Optional.ToNullable(constrainedMaximumCapacity)); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSProfile.Serialization.cs index 9b711e02c4c7..f08f6c815bd9 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSProfile.Serialization.cs @@ -61,6 +61,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("allowExtensionOperations"); writer.WriteBooleanValue(AllowExtensionOperations.Value); } + if (Optional.IsDefined(RequireGuestProvisionSignal)) + { + writer.WritePropertyName("requireGuestProvisionSignal"); + writer.WriteBooleanValue(RequireGuestProvisionSignal.Value); + } writer.WriteEndObject(); } @@ -74,6 +79,7 @@ internal static VirtualMachineScaleSetOSProfile DeserializeVirtualMachineScaleSe Optional linuxConfiguration = default; Optional> secrets = default; Optional allowExtensionOperations = default; + Optional requireGuestProvisionSignal = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("computerNamePrefix")) @@ -141,8 +147,18 @@ internal static VirtualMachineScaleSetOSProfile DeserializeVirtualMachineScaleSe allowExtensionOperations = property.Value.GetBoolean(); continue; } + if (property.NameEquals("requireGuestProvisionSignal")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + requireGuestProvisionSignal = property.Value.GetBoolean(); + continue; + } } - return new VirtualMachineScaleSetOSProfile(computerNamePrefix.Value, adminUsername.Value, adminPassword.Value, customData.Value, windowsConfiguration.Value, linuxConfiguration.Value, Optional.ToList(secrets), Optional.ToNullable(allowExtensionOperations)); + return new VirtualMachineScaleSetOSProfile(computerNamePrefix.Value, adminUsername.Value, adminPassword.Value, customData.Value, windowsConfiguration.Value, linuxConfiguration.Value, Optional.ToList(secrets), Optional.ToNullable(allowExtensionOperations), Optional.ToNullable(requireGuestProvisionSignal)); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSProfile.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSProfile.cs index ac8061f1a246..77d67852cfc9 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSProfile.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSProfile.cs @@ -28,7 +28,8 @@ public VirtualMachineScaleSetOSProfile() /// Specifies the Linux operating system settings on the virtual machine. <br><br>For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). /// Specifies set of certificates that should be installed onto the virtual machines in the scale set. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). /// Specifies whether extension operations should be allowed on the virtual machine scale set. <br><br>This may only be set to False when no extensions are present on the virtual machine scale set. - internal VirtualMachineScaleSetOSProfile(string computerNamePrefix, string adminUsername, string adminPassword, string customData, WindowsConfiguration windowsConfiguration, LinuxConfiguration linuxConfiguration, IList secrets, bool? allowExtensionOperations) + /// Optional property which must either be set to True or omitted. + internal VirtualMachineScaleSetOSProfile(string computerNamePrefix, string adminUsername, string adminPassword, string customData, WindowsConfiguration windowsConfiguration, LinuxConfiguration linuxConfiguration, IList secrets, bool? allowExtensionOperations, bool? requireGuestProvisionSignal) { ComputerNamePrefix = computerNamePrefix; AdminUsername = adminUsername; @@ -38,6 +39,7 @@ internal VirtualMachineScaleSetOSProfile(string computerNamePrefix, string admin LinuxConfiguration = linuxConfiguration; Secrets = secrets; AllowExtensionOperations = allowExtensionOperations; + RequireGuestProvisionSignal = requireGuestProvisionSignal; } /// Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 15 characters long. @@ -56,5 +58,7 @@ internal VirtualMachineScaleSetOSProfile(string computerNamePrefix, string admin public IList Secrets { get; } /// Specifies whether extension operations should be allowed on the virtual machine scale set. <br><br>This may only be set to False when no extensions are present on the virtual machine scale set. public bool? AllowExtensionOperations { get; set; } + /// Optional property which must either be set to True or omitted. + public bool? RequireGuestProvisionSignal { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetReimageContent.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetReimageContent.Serialization.cs index c0a3f665939c..674bf9f8047a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetReimageContent.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetReimageContent.Serialization.cs @@ -30,6 +30,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("tempDisk"); writer.WriteBooleanValue(TempDisk.Value); } + if (Optional.IsDefined(ExactVersion)) + { + writer.WritePropertyName("exactVersion"); + writer.WriteStringValue(ExactVersion); + } + if (Optional.IsDefined(OSProfile)) + { + writer.WritePropertyName("osProfile"); + writer.WriteObjectValue(OSProfile); + } writer.WriteEndObject(); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateVmProfile.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateVmProfile.cs index c0b853af5092..92b7f2588cc4 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateVmProfile.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateVmProfile.cs @@ -56,19 +56,7 @@ public double? BillingMaxPrice } /// Specifies Scheduled Event related configurations. - internal ScheduledEventsProfile ScheduledEventsProfile { get; set; } - /// Specifies Terminate Scheduled Event related configurations. - public TerminateNotificationProfile ScheduledEventsTerminateNotificationProfile - { - get => ScheduledEventsProfile is null ? default : ScheduledEventsProfile.TerminateNotificationProfile; - set - { - if (ScheduledEventsProfile is null) - ScheduledEventsProfile = new ScheduledEventsProfile(); - ScheduledEventsProfile.TerminateNotificationProfile = value; - } - } - + public ScheduledEventsProfile ScheduledEventsProfile { get; set; } /// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. <br><br>Minimum api-version: 2021-03-01. public string UserData { get; set; } /// Specifies the hardware profile related details of a scale set. <br><br>Minimum api-version: 2021-11-01. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.Serialization.cs index 77487e18a792..670ba2707cb1 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.Serialization.cs @@ -7,6 +7,7 @@ using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Compute.Models { @@ -90,6 +91,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("hardwareProfile"); writer.WriteObjectValue(HardwareProfile); } + if (Optional.IsDefined(ServiceArtifactReference)) + { + writer.WritePropertyName("serviceArtifactReference"); + JsonSerializer.Serialize(writer, ServiceArtifactReference); + } writer.WriteEndObject(); } @@ -110,6 +116,7 @@ internal static VirtualMachineScaleSetVmProfile DeserializeVirtualMachineScaleSe Optional capacityReservation = default; Optional applicationProfile = default; Optional hardwareProfile = default; + Optional serviceArtifactReference = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("osProfile")) @@ -252,8 +259,18 @@ internal static VirtualMachineScaleSetVmProfile DeserializeVirtualMachineScaleSe hardwareProfile = VirtualMachineScaleSetHardwareProfile.DeserializeVirtualMachineScaleSetHardwareProfile(property.Value); continue; } + if (property.NameEquals("serviceArtifactReference")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + serviceArtifactReference = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } } - return new VirtualMachineScaleSetVmProfile(osProfile.Value, storageProfile.Value, networkProfile.Value, securityProfile.Value, diagnosticsProfile.Value, extensionProfile.Value, licenseType.Value, Optional.ToNullable(priority), Optional.ToNullable(evictionPolicy), billingProfile.Value, scheduledEventsProfile.Value, userData.Value, capacityReservation.Value, applicationProfile.Value, hardwareProfile.Value); + return new VirtualMachineScaleSetVmProfile(osProfile.Value, storageProfile.Value, networkProfile.Value, securityProfile.Value, diagnosticsProfile.Value, extensionProfile.Value, licenseType.Value, Optional.ToNullable(priority), Optional.ToNullable(evictionPolicy), billingProfile.Value, scheduledEventsProfile.Value, userData.Value, capacityReservation.Value, applicationProfile.Value, hardwareProfile.Value, serviceArtifactReference); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.cs index eab60aa0fa4a..0e0370382bf6 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Compute.Models { @@ -34,7 +35,8 @@ public VirtualMachineScaleSetVmProfile() /// Specifies the capacity reservation related details of a scale set. <br><br>Minimum api-version: 2021-04-01. /// Specifies the gallery applications that should be made available to the VM/VMSS. /// Specifies the hardware profile related details of a scale set. <br><br>Minimum api-version: 2021-11-01. - internal VirtualMachineScaleSetVmProfile(VirtualMachineScaleSetOSProfile osProfile, VirtualMachineScaleSetStorageProfile storageProfile, VirtualMachineScaleSetNetworkProfile networkProfile, SecurityProfile securityProfile, DiagnosticsProfile diagnosticsProfile, VirtualMachineScaleSetExtensionProfile extensionProfile, string licenseType, VirtualMachinePriorityType? priority, VirtualMachineEvictionPolicyType? evictionPolicy, BillingProfile billingProfile, ScheduledEventsProfile scheduledEventsProfile, string userData, CapacityReservationProfile capacityReservation, ApplicationProfile applicationProfile, VirtualMachineScaleSetHardwareProfile hardwareProfile) + /// Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. Minimum api-version: 2022-11-01. + internal VirtualMachineScaleSetVmProfile(VirtualMachineScaleSetOSProfile osProfile, VirtualMachineScaleSetStorageProfile storageProfile, VirtualMachineScaleSetNetworkProfile networkProfile, SecurityProfile securityProfile, DiagnosticsProfile diagnosticsProfile, VirtualMachineScaleSetExtensionProfile extensionProfile, string licenseType, VirtualMachinePriorityType? priority, VirtualMachineEvictionPolicyType? evictionPolicy, BillingProfile billingProfile, ScheduledEventsProfile scheduledEventsProfile, string userData, CapacityReservationProfile capacityReservation, ApplicationProfile applicationProfile, VirtualMachineScaleSetHardwareProfile hardwareProfile, WritableSubResource serviceArtifactReference) { OSProfile = osProfile; StorageProfile = storageProfile; @@ -51,6 +53,7 @@ internal VirtualMachineScaleSetVmProfile(VirtualMachineScaleSetOSProfile osProfi CapacityReservation = capacityReservation; ApplicationProfile = applicationProfile; HardwareProfile = hardwareProfile; + ServiceArtifactReference = serviceArtifactReference; } /// Specifies the operating system settings for the virtual machines in the scale set. @@ -98,19 +101,7 @@ public double? BillingMaxPrice } /// Specifies Scheduled Event related configurations. - internal ScheduledEventsProfile ScheduledEventsProfile { get; set; } - /// Specifies Terminate Scheduled Event related configurations. - public TerminateNotificationProfile ScheduledEventsTerminateNotificationProfile - { - get => ScheduledEventsProfile is null ? default : ScheduledEventsProfile.TerminateNotificationProfile; - set - { - if (ScheduledEventsProfile is null) - ScheduledEventsProfile = new ScheduledEventsProfile(); - ScheduledEventsProfile.TerminateNotificationProfile = value; - } - } - + public ScheduledEventsProfile ScheduledEventsProfile { get; set; } /// UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets in here. <br><br>Minimum api-version: 2021-03-01. public string UserData { get; set; } /// Specifies the capacity reservation related details of a scale set. <br><br>Minimum api-version: 2021-04-01. @@ -153,5 +144,19 @@ public VirtualMachineSizeProperties HardwareVmSizeProperties HardwareProfile.VmSizeProperties = value; } } + + /// Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. Minimum api-version: 2022-11-01. + internal WritableSubResource ServiceArtifactReference { get; set; } + /// Gets or sets Id. + public ResourceIdentifier ServiceArtifactReferenceId + { + get => ServiceArtifactReference is null ? default : ServiceArtifactReference.Id; + set + { + if (ServiceArtifactReference is null) + ServiceArtifactReference = new WritableSubResource(); + ServiceArtifactReference.Id = value; + } + } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmReimageContent.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmReimageContent.Serialization.cs index 26397d7e2b63..3536994cb17d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmReimageContent.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmReimageContent.Serialization.cs @@ -20,6 +20,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("tempDisk"); writer.WriteBooleanValue(TempDisk.Value); } + if (Optional.IsDefined(ExactVersion)) + { + writer.WritePropertyName("exactVersion"); + writer.WriteStringValue(ExactVersion); + } + if (Optional.IsDefined(OSProfile)) + { + writer.WritePropertyName("osProfile"); + writer.WriteObjectValue(OSProfile); + } writer.WriteEndObject(); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/AvailabilitySetsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/AvailabilitySetsRestOperations.cs index 43c96c4d7e8d..a7232bf13e66 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/AvailabilitySetsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/AvailabilitySetsRestOperations.cs @@ -33,7 +33,7 @@ public AvailabilitySetsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CapacityReservationGroupsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CapacityReservationGroupsRestOperations.cs index 774398c5ae6e..99d58aece4fe 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CapacityReservationGroupsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CapacityReservationGroupsRestOperations.cs @@ -33,7 +33,7 @@ public CapacityReservationGroupsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CapacityReservationsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CapacityReservationsRestOperations.cs index 101f9e62237e..3a6c246ac772 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CapacityReservationsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CapacityReservationsRestOperations.cs @@ -33,7 +33,7 @@ public CapacityReservationsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServiceOperatingSystemsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServiceOperatingSystemsRestOperations.cs index 48e6437d5ddb..d3ac6ed9e537 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServiceOperatingSystemsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServiceOperatingSystemsRestOperations.cs @@ -33,7 +33,7 @@ public CloudServiceOperatingSystemsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-04-04"; + _apiVersion = apiVersion ?? "2022-09-04"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServiceRoleInstancesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServiceRoleInstancesRestOperations.cs index 5ddf0df44357..30e4063d0848 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServiceRoleInstancesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServiceRoleInstancesRestOperations.cs @@ -34,7 +34,7 @@ public CloudServiceRoleInstancesRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-04-04"; + _apiVersion = apiVersion ?? "2022-09-04"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServiceRolesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServiceRolesRestOperations.cs index 9ffe7867cdb9..8dac56731fcc 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServiceRolesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServiceRolesRestOperations.cs @@ -33,7 +33,7 @@ public CloudServiceRolesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-04-04"; + _apiVersion = apiVersion ?? "2022-09-04"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServicesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServicesRestOperations.cs index 27e32347a932..b0f762775832 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServicesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServicesRestOperations.cs @@ -33,7 +33,7 @@ public CloudServicesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-04-04"; + _apiVersion = apiVersion ?? "2022-09-04"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServicesUpdateDomainRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServicesUpdateDomainRestOperations.cs index 8ddd43621555..41c08e580f8f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServicesUpdateDomainRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CloudServicesUpdateDomainRestOperations.cs @@ -33,7 +33,7 @@ public CloudServicesUpdateDomainRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-04-04"; + _apiVersion = apiVersion ?? "2022-09-04"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DedicatedHostGroupsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DedicatedHostGroupsRestOperations.cs index 1625e2602fe5..1d7518f9f391 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DedicatedHostGroupsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DedicatedHostGroupsRestOperations.cs @@ -33,7 +33,7 @@ public DedicatedHostGroupsRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DedicatedHostsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DedicatedHostsRestOperations.cs index 16e94e247218..7b800812ef40 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DedicatedHostsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DedicatedHostsRestOperations.cs @@ -33,7 +33,7 @@ public DedicatedHostsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/ImagesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/ImagesRestOperations.cs index cd587ef0a442..53954b64f7a1 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/ImagesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/ImagesRestOperations.cs @@ -33,7 +33,7 @@ public ImagesRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/LogAnalyticsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/LogAnalyticsRestOperations.cs index ae8be3a8ce91..e5fead7fb0da 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/LogAnalyticsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/LogAnalyticsRestOperations.cs @@ -32,7 +32,7 @@ public LogAnalyticsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/ProximityPlacementGroupsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/ProximityPlacementGroupsRestOperations.cs index 3ca6d0ded646..73529eb91e5e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/ProximityPlacementGroupsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/ProximityPlacementGroupsRestOperations.cs @@ -33,7 +33,7 @@ public ProximityPlacementGroupsRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/RestorePointCollectionsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/RestorePointCollectionsRestOperations.cs index cf227baa8262..998c053f0e35 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/RestorePointCollectionsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/RestorePointCollectionsRestOperations.cs @@ -33,7 +33,7 @@ public RestorePointCollectionsRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/RestorePointsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/RestorePointsRestOperations.cs index ab16059d3296..8157953c532a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/RestorePointsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/RestorePointsRestOperations.cs @@ -33,7 +33,7 @@ public RestorePointsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SshPublicKeysRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SshPublicKeysRestOperations.cs index 57e9916f5ce7..555f1bc4116c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SshPublicKeysRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SshPublicKeysRestOperations.cs @@ -33,7 +33,7 @@ public SshPublicKeysRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/UsageRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/UsageRestOperations.cs index 49bd3e713a97..4fe22233e8da 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/UsageRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/UsageRestOperations.cs @@ -33,7 +33,7 @@ public UsageRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineExtensionImagesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineExtensionImagesRestOperations.cs index fe64a915b934..768149a1fc29 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineExtensionImagesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineExtensionImagesRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachineExtensionImagesRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineExtensionsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineExtensionsRestOperations.cs index 8a0373a332fe..1362ac732f87 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineExtensionsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineExtensionsRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachineExtensionsRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineImagesEdgeZoneRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineImagesEdgeZoneRestOperations.cs index f15c25f7a42f..1aa0484fd4ed 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineImagesEdgeZoneRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineImagesEdgeZoneRestOperations.cs @@ -34,7 +34,7 @@ public VirtualMachineImagesEdgeZoneRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineImagesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineImagesRestOperations.cs index 4037a3d3f5d4..c822059c2140 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineImagesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineImagesRestOperations.cs @@ -34,7 +34,7 @@ public VirtualMachineImagesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineRunCommandsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineRunCommandsRestOperations.cs index 16854961ffc1..4e8566c0dfaa 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineRunCommandsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineRunCommandsRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachineRunCommandsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetExtensionsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetExtensionsRestOperations.cs index c6e5d6f3c447..ee100e3456ab 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetExtensionsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetExtensionsRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachineScaleSetExtensionsRestOperations(HttpPipeline pipeline, str { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetRollingUpgradesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetRollingUpgradesRestOperations.cs index a28abbcdabb0..4d5b49f1738d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetRollingUpgradesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetRollingUpgradesRestOperations.cs @@ -32,7 +32,7 @@ public VirtualMachineScaleSetRollingUpgradesRestOperations(HttpPipeline pipeline { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMExtensionsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMExtensionsRestOperations.cs index ef0797078f9e..101c32583d59 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMExtensionsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMExtensionsRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachineScaleSetVMExtensionsRestOperations(HttpPipeline pipeline, s { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMRunCommandsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMRunCommandsRestOperations.cs index d3fdd104494e..70c25f34ada9 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMRunCommandsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMRunCommandsRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachineScaleSetVMRunCommandsRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMsRestOperations.cs index 40b28ef5c2f8..f156e0962204 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMsRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachineScaleSetVMsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetsRestOperations.cs index 3a32d9ab6356..e4975cd383c2 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetsRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachineScaleSetsRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineSizesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineSizesRestOperations.cs index fa9aee31ccb1..0f7d9ef5f9b3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineSizesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineSizesRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachineSizesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachinesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachinesRestOperations.cs index eb5ccb162879..3a34a56cb6c2 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachinesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachinesRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachinesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -1429,7 +1429,7 @@ internal HttpMessage CreateReimageRequest(string subscriptionId, string resource return message; } - /// Reimages the virtual machine which has an ephemeral OS disk back to its initial state. + /// Reimages (upgrade the operating system) a virtual machine which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group. /// The name of the virtual machine. @@ -1455,7 +1455,7 @@ public async Task ReimageAsync(string subscriptionId, string resourceG } } - /// Reimages the virtual machine which has an ephemeral OS disk back to its initial state. + /// Reimages (upgrade the operating system) a virtual machine which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group. /// The name of the virtual machine. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineData.cs index c6814af4c7d3..f1dbcdc92b9d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineData.cs @@ -235,19 +235,7 @@ public ResourceIdentifier HostGroupId /// Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains.<br><li>This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set.<li>The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' &gt; 1.<li>This property cannot be updated once the Virtual Machine is created.<li>Fault domain assignment can be viewed in the Virtual Machine Instance View.<br><br>Minimum api‐version: 2020‐12‐01. public int? PlatformFaultDomain { get; set; } /// Specifies Scheduled Event related configurations. - internal ScheduledEventsProfile ScheduledEventsProfile { get; set; } - /// Specifies Terminate Scheduled Event related configurations. - public TerminateNotificationProfile ScheduledEventsTerminateNotificationProfile - { - get => ScheduledEventsProfile is null ? default : ScheduledEventsProfile.TerminateNotificationProfile; - set - { - if (ScheduledEventsProfile is null) - ScheduledEventsProfile = new ScheduledEventsProfile(); - ScheduledEventsProfile.TerminateNotificationProfile = value; - } - } - + public ScheduledEventsProfile ScheduledEventsProfile { get; set; } /// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. <br><br>Minimum api-version: 2021-03-01. public string UserData { get; set; } /// Specifies information about the capacity reservation that is used to allocate virtual machine. <br><br>Minimum api-version: 2021-04-01. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineResource.cs index a15e261ce3fd..78422f23ac59 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineResource.cs @@ -902,7 +902,7 @@ public virtual ArmOperation Redeploy(WaitUntil waitUntil, CancellationToken canc } /// - /// Reimages the virtual machine which has an ephemeral OS disk back to its initial state. + /// Reimages (upgrade the operating system) a virtual machine which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage. /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage /// Operation Id: VirtualMachines_Reimage /// @@ -929,7 +929,7 @@ public virtual async Task ReimageAsync(WaitUntil waitUntil, Virtua } /// - /// Reimages the virtual machine which has an ephemeral OS disk back to its initial state. + /// Reimages (upgrade the operating system) a virtual machine which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage. /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage /// Operation Id: VirtualMachines_Reimage /// diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetData.cs index a6bd81562e7a..c60b2ab7cb2f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetData.cs @@ -54,7 +54,8 @@ public VirtualMachineScaleSetData(AzureLocation location) : base(location) /// Specifies the Spot Restore properties for the virtual machine scale set. /// Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance. /// Specifies the time at which the Virtual Machine Scale Set resource was created.<br><br>Minimum api-version: 2021-11-01. - internal VirtualMachineScaleSetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ComputeSku sku, ComputePlan plan, ManagedServiceIdentity identity, IList zones, ExtendedLocation extendedLocation, VirtualMachineScaleSetUpgradePolicy upgradePolicy, AutomaticRepairsPolicy automaticRepairsPolicy, VirtualMachineScaleSetVmProfile virtualMachineProfile, string provisioningState, bool? overprovision, bool? doNotRunExtensionsOnOverprovisionedVms, string uniqueId, bool? singlePlacementGroup, bool? zoneBalance, int? platformFaultDomainCount, WritableSubResource proximityPlacementGroup, WritableSubResource hostGroup, AdditionalCapabilities additionalCapabilities, ScaleInPolicy scaleInPolicy, OrchestrationMode? orchestrationMode, SpotRestorePolicy spotRestorePolicy, VirtualMachineScaleSetPriorityMixPolicy priorityMixPolicy, DateTimeOffset? timeCreated) : base(id, name, resourceType, systemData, tags, location) + /// Optional property which must either be set to True or omitted. + internal VirtualMachineScaleSetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ComputeSku sku, ComputePlan plan, ManagedServiceIdentity identity, IList zones, ExtendedLocation extendedLocation, VirtualMachineScaleSetUpgradePolicy upgradePolicy, AutomaticRepairsPolicy automaticRepairsPolicy, VirtualMachineScaleSetVmProfile virtualMachineProfile, string provisioningState, bool? overprovision, bool? doNotRunExtensionsOnOverprovisionedVms, string uniqueId, bool? singlePlacementGroup, bool? zoneBalance, int? platformFaultDomainCount, WritableSubResource proximityPlacementGroup, WritableSubResource hostGroup, AdditionalCapabilities additionalCapabilities, ScaleInPolicy scaleInPolicy, OrchestrationMode? orchestrationMode, SpotRestorePolicy spotRestorePolicy, VirtualMachineScaleSetPriorityMixPolicy priorityMixPolicy, DateTimeOffset? timeCreated, bool? constrainedMaximumCapacity) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Plan = plan; @@ -79,6 +80,7 @@ internal VirtualMachineScaleSetData(ResourceIdentifier id, string name, Resource SpotRestorePolicy = spotRestorePolicy; PriorityMixPolicy = priorityMixPolicy; TimeCreated = timeCreated; + ConstrainedMaximumCapacity = constrainedMaximumCapacity; } /// The virtual machine scale set sku. @@ -151,5 +153,7 @@ public ResourceIdentifier HostGroupId public VirtualMachineScaleSetPriorityMixPolicy PriorityMixPolicy { get; set; } /// Specifies the time at which the Virtual Machine Scale Set resource was created.<br><br>Minimum api-version: 2021-11-01. public DateTimeOffset? TimeCreated { get; } + /// Optional property which must either be set to True or omitted. + public bool? ConstrainedMaximumCapacity { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md b/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md index 49f46c7bbda3..2001e1822887 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md +++ b/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md @@ -10,7 +10,7 @@ Run `dotnet build /t:GenerateCode` to generate code. azure-arm: true library-name: Compute namespace: Azure.ResourceManager.Compute -require: https://github.com/Azure/azure-rest-api-specs/blob/ddca448bd879175a928b990e0f25ca3a0e6c1c33/specification/compute/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/compute/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true