diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/api/Azure.ResourceManager.ComputeFleet.netstandard2.0.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/api/Azure.ResourceManager.ComputeFleet.netstandard2.0.cs index 7968f3f304d6..7141b7d06d17 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/api/Azure.ResourceManager.ComputeFleet.netstandard2.0.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/api/Azure.ResourceManager.ComputeFleet.netstandard2.0.cs @@ -91,6 +91,55 @@ protected MockableComputeFleetSubscriptionResource() { } } namespace Azure.ResourceManager.ComputeFleet.Models { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcceleratorManufacturer : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcceleratorManufacturer(string value) { throw null; } + public static Azure.ResourceManager.ComputeFleet.Models.AcceleratorManufacturer AMD { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.AcceleratorManufacturer Nvidia { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.AcceleratorManufacturer Xilinx { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeFleet.Models.AcceleratorManufacturer 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.ComputeFleet.Models.AcceleratorManufacturer left, Azure.ResourceManager.ComputeFleet.Models.AcceleratorManufacturer right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeFleet.Models.AcceleratorManufacturer (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeFleet.Models.AcceleratorManufacturer left, Azure.ResourceManager.ComputeFleet.Models.AcceleratorManufacturer right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcceleratorType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcceleratorType(string value) { throw null; } + public static Azure.ResourceManager.ComputeFleet.Models.AcceleratorType FPGA { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.AcceleratorType GPU { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeFleet.Models.AcceleratorType 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.ComputeFleet.Models.AcceleratorType left, Azure.ResourceManager.ComputeFleet.Models.AcceleratorType right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeFleet.Models.AcceleratorType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeFleet.Models.AcceleratorType left, Azure.ResourceManager.ComputeFleet.Models.AcceleratorType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AdditionalCapabilities : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AdditionalCapabilities() { } + public bool? HibernationEnabled { get { throw null; } set { } } + public bool? UltraSSDEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeFleet.Models.AdditionalCapabilities System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeFleet.Models.AdditionalCapabilities System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AdditionalInformationSettingName : System.IEquatable { @@ -109,6 +158,24 @@ namespace Azure.ResourceManager.ComputeFleet.Models public static bool operator !=(Azure.ResourceManager.ComputeFleet.Models.AdditionalInformationSettingName left, Azure.ResourceManager.ComputeFleet.Models.AdditionalInformationSettingName 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 + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ArchitectureType(string value) { throw null; } + public static Azure.ResourceManager.ComputeFleet.Models.ArchitectureType ARM64 { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.ArchitectureType X64 { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeFleet.Models.ArchitectureType 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.ComputeFleet.Models.ArchitectureType left, Azure.ResourceManager.ComputeFleet.Models.ArchitectureType right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeFleet.Models.ArchitectureType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeFleet.Models.ArchitectureType left, Azure.ResourceManager.ComputeFleet.Models.ArchitectureType right) { throw null; } + public override string ToString() { throw null; } + } public static partial class ArmComputeFleetModelFactory { public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetApiError ComputeFleetApiError(string code = null, string target = null, string message = null, System.Collections.Generic.IEnumerable details = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetInnerError innererror = null) { throw null; } @@ -116,7 +183,7 @@ public static partial class ArmComputeFleetModelFactory public static Azure.ResourceManager.ComputeFleet.ComputeFleetData ComputeFleetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProperties properties = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Models.ArmPlan plan = null) { throw null; } public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetImageReference ComputeFleetImageReference(Azure.Core.ResourceIdentifier id = null, string publisher = null, string offer = null, string sku = null, string version = null, string exactVersion = null, string sharedGalleryImageId = null, string communityGalleryImageId = null) { throw null; } public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetInnerError ComputeFleetInnerError(string exceptionType = null, string errorDetail = null) { throw null; } - public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProperties ComputeFleetProperties(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProvisioningState? provisioningState = default(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProvisioningState?), Azure.ResourceManager.ComputeFleet.Models.SpotPriorityProfile spotPriorityProfile = null, Azure.ResourceManager.ComputeFleet.Models.RegularPriorityProfile regularPriorityProfile = null, System.Collections.Generic.IEnumerable vmSizesProfile = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetComputeProfile computeProfile = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string uniqueId = null) { throw null; } + public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProperties ComputeFleetProperties(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProvisioningState? provisioningState = default(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProvisioningState?), Azure.ResourceManager.ComputeFleet.Models.SpotPriorityProfile spotPriorityProfile = null, Azure.ResourceManager.ComputeFleet.Models.RegularPriorityProfile regularPriorityProfile = null, System.Collections.Generic.IEnumerable vmSizesProfile = null, Azure.ResourceManager.ComputeFleet.Models.VmAttributes vmAttributes = null, System.Collections.Generic.IEnumerable additionalLocationsLocationProfiles = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetComputeProfile computeProfile = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string uniqueId = null) { throw null; } public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmProfile ComputeFleetVmProfile(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssOSProfile osProfile = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssStorageProfile storageProfile = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssNetworkProfile networkProfile = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetSecurityProfile securityProfile = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetBootDiagnostics bootDiagnostics = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssExtensionProfile extensionProfile = null, string licenseType = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetScheduledEventsProfile scheduledEventsProfile = null, string userData = null, Azure.Core.ResourceIdentifier capacityReservationGroupId = null, System.Collections.Generic.IEnumerable galleryApplications = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmSizeProperties hardwareVmSizeProperties = null, Azure.Core.ResourceIdentifier serviceArtifactReferenceId = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetSecurityPostureReference securityPostureReference = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmss ComputeFleetVmss(string id = null, string type = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProvisioningState operationStatus = default(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProvisioningState), Azure.ResourceManager.ComputeFleet.Models.ComputeFleetApiError error = null) { throw null; } public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssExtension ComputeFleetVmssExtension(Azure.Core.ResourceIdentifier id = null, string name = null, string extensionType = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssExtensionProperties properties = null) { throw null; } @@ -184,6 +251,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ComputeFleetComputeProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ComputeFleetComputeProfile(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmProfile baseVirtualMachineProfile) { } + public Azure.ResourceManager.ComputeFleet.Models.AdditionalCapabilities AdditionalVirtualMachineCapabilities { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmProfile BaseVirtualMachineProfile { get { throw null; } set { } } public string ComputeApiVersion { get { throw null; } set { } } public int? PlatformFaultDomainCount { get { throw null; } set { } } @@ -597,12 +665,14 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ComputeFleetProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ComputeFleetProperties(System.Collections.Generic.IEnumerable vmSizesProfile, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetComputeProfile computeProfile) { } + public System.Collections.Generic.IList AdditionalLocationsLocationProfiles { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetComputeProfile ComputeProfile { get { throw null; } set { } } public System.DateTimeOffset? CreatedOn { get { throw null; } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.ComputeFleet.Models.RegularPriorityProfile RegularPriorityProfile { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.SpotPriorityProfile SpotPriorityProfile { get { throw null; } set { } } public string UniqueId { get { throw null; } } + public Azure.ResourceManager.ComputeFleet.Models.VmAttributes VmAttributes { get { throw null; } set { } } public System.Collections.Generic.IList VmSizesProfile { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1359,6 +1429,56 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CpuManufacturer : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CpuManufacturer(string value) { throw null; } + public static Azure.ResourceManager.ComputeFleet.Models.CpuManufacturer AMD { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.CpuManufacturer Ampere { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.CpuManufacturer Intel { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.CpuManufacturer Microsoft { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeFleet.Models.CpuManufacturer 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.ComputeFleet.Models.CpuManufacturer left, Azure.ResourceManager.ComputeFleet.Models.CpuManufacturer right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeFleet.Models.CpuManufacturer (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeFleet.Models.CpuManufacturer left, Azure.ResourceManager.ComputeFleet.Models.CpuManufacturer right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LocalStorageDiskType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LocalStorageDiskType(string value) { throw null; } + public static Azure.ResourceManager.ComputeFleet.Models.LocalStorageDiskType HDD { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.LocalStorageDiskType SSD { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeFleet.Models.LocalStorageDiskType 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.ComputeFleet.Models.LocalStorageDiskType left, Azure.ResourceManager.ComputeFleet.Models.LocalStorageDiskType right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeFleet.Models.LocalStorageDiskType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeFleet.Models.LocalStorageDiskType left, Azure.ResourceManager.ComputeFleet.Models.LocalStorageDiskType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LocationProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public LocationProfile(string location) { } + public string Location { get { throw null; } set { } } + public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmProfile VirtualMachineProfileOverride { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeFleet.Models.LocationProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeFleet.Models.LocationProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ProxyAgentExecuteMode : System.IEquatable { private readonly object _dummy; @@ -1442,6 +1562,102 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class VmAttributeMinMaxDouble : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VmAttributeMinMaxDouble() { } + public double? Max { get { throw null; } set { } } + public double? Min { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeFleet.Models.VmAttributeMinMaxDouble System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeFleet.Models.VmAttributeMinMaxDouble System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VmAttributeMinMaxInteger : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VmAttributeMinMaxInteger() { } + public int? Max { get { throw null; } set { } } + public int? Min { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeFleet.Models.VmAttributeMinMaxInteger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeFleet.Models.VmAttributeMinMaxInteger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VmAttributes : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VmAttributes(Azure.ResourceManager.ComputeFleet.Models.VmAttributeMinMaxInteger vCpuCount, Azure.ResourceManager.ComputeFleet.Models.VmAttributeMinMaxDouble memoryInGiB) { } + public Azure.ResourceManager.ComputeFleet.Models.VmAttributeMinMaxInteger AcceleratorCount { get { throw null; } set { } } + public System.Collections.Generic.IList AcceleratorManufacturers { get { throw null; } } + public Azure.ResourceManager.ComputeFleet.Models.VmAttributeSupport? AcceleratorSupport { get { throw null; } set { } } + public System.Collections.Generic.IList AcceleratorTypes { get { throw null; } } + public System.Collections.Generic.IList ArchitectureTypes { get { throw null; } } + public Azure.ResourceManager.ComputeFleet.Models.VmAttributeSupport? BurstableSupport { get { throw null; } set { } } + public System.Collections.Generic.IList CpuManufacturers { get { throw null; } } + public Azure.ResourceManager.ComputeFleet.Models.VmAttributeMinMaxInteger DataDiskCount { get { throw null; } set { } } + public System.Collections.Generic.IList ExcludedVmSizes { get { throw null; } } + public System.Collections.Generic.IList LocalStorageDiskTypes { get { throw null; } } + public Azure.ResourceManager.ComputeFleet.Models.VmAttributeMinMaxDouble LocalStorageInGiB { get { throw null; } set { } } + public Azure.ResourceManager.ComputeFleet.Models.VmAttributeSupport? LocalStorageSupport { get { throw null; } set { } } + public Azure.ResourceManager.ComputeFleet.Models.VmAttributeMinMaxDouble MemoryInGiB { get { throw null; } set { } } + public Azure.ResourceManager.ComputeFleet.Models.VmAttributeMinMaxDouble MemoryInGiBPerVCpu { get { throw null; } set { } } + public Azure.ResourceManager.ComputeFleet.Models.VmAttributeMinMaxDouble NetworkBandwidthInMbps { get { throw null; } set { } } + public Azure.ResourceManager.ComputeFleet.Models.VmAttributeMinMaxInteger NetworkInterfaceCount { get { throw null; } set { } } + public Azure.ResourceManager.ComputeFleet.Models.VmAttributeMinMaxInteger RdmaNetworkInterfaceCount { get { throw null; } set { } } + public Azure.ResourceManager.ComputeFleet.Models.VmAttributeSupport? RdmaSupport { get { throw null; } set { } } + public Azure.ResourceManager.ComputeFleet.Models.VmAttributeMinMaxInteger VCpuCount { get { throw null; } set { } } + public System.Collections.Generic.IList VmCategories { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeFleet.Models.VmAttributes System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeFleet.Models.VmAttributes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VmAttributeSupport : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VmAttributeSupport(string value) { throw null; } + public static Azure.ResourceManager.ComputeFleet.Models.VmAttributeSupport Excluded { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.VmAttributeSupport Included { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.VmAttributeSupport Required { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeFleet.Models.VmAttributeSupport 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.ComputeFleet.Models.VmAttributeSupport left, Azure.ResourceManager.ComputeFleet.Models.VmAttributeSupport right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeFleet.Models.VmAttributeSupport (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeFleet.Models.VmAttributeSupport left, Azure.ResourceManager.ComputeFleet.Models.VmAttributeSupport right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VmCategory : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VmCategory(string value) { throw null; } + public static Azure.ResourceManager.ComputeFleet.Models.VmCategory ComputeOptimized { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.VmCategory FpgaAccelerated { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.VmCategory GeneralPurpose { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.VmCategory GpuAccelerated { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.VmCategory HighPerformanceCompute { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.VmCategory MemoryOptimized { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.VmCategory StorageOptimized { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeFleet.Models.VmCategory 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.ComputeFleet.Models.VmCategory left, Azure.ResourceManager.ComputeFleet.Models.VmCategory right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeFleet.Models.VmCategory (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeFleet.Models.VmCategory left, Azure.ResourceManager.ComputeFleet.Models.VmCategory right) { throw null; } + public override string ToString() { throw null; } + } public partial class WindowsSetupAdditionalInformation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WindowsSetupAdditionalInformation() { } diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetCollection.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetCollection.cs index ce4b3170fe83..3fc85311e425 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetCollection.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_ComputeFleetCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_FleetsGet() { - // Generated from example definition: 2024-05-01-preview/Fleets_Get.json + // Generated from example definition: 2024-11-01/Fleets_Get.json // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task Get_FleetsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_FleetsGet() { - // Generated from example definition: 2024-05-01-preview/Fleets_Get.json + // Generated from example definition: 2024-11-01/Fleets_Get.json // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Exists_FleetsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_FleetsGet() { - // Generated from example definition: 2024-05-01-preview/Fleets_Get.json + // Generated from example definition: 2024-11-01/Fleets_Get.json // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_FleetsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_FleetsCreateOrUpdate() { - // Generated from example definition: 2024-05-01-preview/Fleets_CreateOrUpdate.json + // Generated from example definition: 2024-11-01/Fleets_CreateOrUpdate.json // this example is just showing the usage of "Fleets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -558,7 +558,7 @@ public async Task CreateOrUpdate_FleetsCreateOrUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_FleetsCreateOrUpdateMinimumSet() { - // Generated from example definition: 2024-05-01-preview/Fleets_CreateOrUpdate_MinimumSet.json + // Generated from example definition: 2024-11-01/Fleets_CreateOrUpdate_MinimumSet.json // this example is just showing the usage of "Fleets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -687,7 +687,7 @@ public async Task CreateOrUpdate_FleetsCreateOrUpdateMinimumSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_FleetsListByResourceGroup() { - // Generated from example definition: 2024-05-01-preview/Fleets_ListByResourceGroup.json + // Generated from example definition: 2024-11-01/Fleets_ListByResourceGroup.json // this example is just showing the usage of "Fleet_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetResource.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetResource.cs index 3189efb6f7f8..a181196692d0 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetResource.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetResource.cs @@ -23,7 +23,7 @@ public partial class Sample_ComputeFleetResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_FleetsGet() { - // Generated from example definition: 2024-05-01-preview/Fleets_Get.json + // Generated from example definition: 2024-11-01/Fleets_Get.json // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_FleetsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_FleetsUpdate() { - // Generated from example definition: 2024-05-01-preview/Fleets_Update.json + // Generated from example definition: 2024-11-01/Fleets_Update.json // this example is just showing the usage of "Fleets_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -469,7 +469,7 @@ public async Task Update_FleetsUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_FleetsDelete() { - // Generated from example definition: 2024-05-01-preview/Fleets_Delete.json + // Generated from example definition: 2024-11-01/Fleets_Delete.json // this example is just showing the usage of "Fleets_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -496,7 +496,7 @@ public async Task Delete_FleetsDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetComputeFleets_FleetsListBySubscription() { - // Generated from example definition: 2024-05-01-preview/Fleets_ListBySubscription.json + // Generated from example definition: 2024-11-01/Fleets_ListBySubscription.json // this example is just showing the usage of "Fleet_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -528,7 +528,7 @@ public async Task GetComputeFleets_FleetsListBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVirtualMachineScaleSets_FleetsListVirtualMachineScaleSets() { - // Generated from example definition: 2024-05-01-preview/Fleets_ListVirtualMachineScaleSets.json + // Generated from example definition: 2024-11-01/Fleets_ListVirtualMachineScaleSets.json // this example is just showing the usage of "VirtualMachineScaleSet_ListVirtualMachineScaleSets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ArmComputeFleetModelFactory.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ArmComputeFleetModelFactory.cs index 84ec227471d8..2d31dc7c36c6 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ArmComputeFleetModelFactory.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ArmComputeFleetModelFactory.cs @@ -52,19 +52,24 @@ public static ComputeFleetData ComputeFleetData(ResourceIdentifier id = null, st /// Configuration Options for Spot instances in Compute Fleet. /// Configuration Options for Regular instances in Compute Fleet. /// List of VM sizes supported for Compute Fleet. + /// Attribute based Fleet. + /// Represents the configuration for additional locations where Fleet resources may be deployed. /// Compute Profile to use for running user's workloads. /// Specifies the time at which the Compute Fleet is created. /// Specifies the ID which uniquely identifies a Compute Fleet. /// A new instance for mocking. - public static ComputeFleetProperties ComputeFleetProperties(ComputeFleetProvisioningState? provisioningState = null, SpotPriorityProfile spotPriorityProfile = null, RegularPriorityProfile regularPriorityProfile = null, IEnumerable vmSizesProfile = null, ComputeFleetComputeProfile computeProfile = null, DateTimeOffset? createdOn = null, string uniqueId = null) + public static ComputeFleetProperties ComputeFleetProperties(ComputeFleetProvisioningState? provisioningState = null, SpotPriorityProfile spotPriorityProfile = null, RegularPriorityProfile regularPriorityProfile = null, IEnumerable vmSizesProfile = null, VmAttributes vmAttributes = null, IEnumerable additionalLocationsLocationProfiles = null, ComputeFleetComputeProfile computeProfile = null, DateTimeOffset? createdOn = null, string uniqueId = null) { vmSizesProfile ??= new List(); + additionalLocationsLocationProfiles ??= new List(); return new ComputeFleetProperties( provisioningState, spotPriorityProfile, regularPriorityProfile, vmSizesProfile?.ToList(), + vmAttributes, + additionalLocationsLocationProfiles != null ? new AdditionalLocationsProfile(additionalLocationsLocationProfiles?.ToList(), serializedAdditionalRawData: null) : null, computeProfile, createdOn, uniqueId, diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetCollection.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetCollection.cs index 323ce687d8fb..5e023cb473a5 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetCollection.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string fleetN /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string fleetName, Cancellation /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string fleetName, Cancella /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string fleetName, CancellationToken cancell /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetResource.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetResource.cs index 150cc0ab22f8..6fe487a6335a 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetResource.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Co /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -390,7 +390,7 @@ public virtual AsyncPageable GetVirtualMachineScaleSetsAsync(C /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -420,7 +420,7 @@ public virtual Pageable GetVirtualMachineScaleSets(Cancellatio /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -482,7 +482,7 @@ public virtual async Task> AddTagAsync(string key /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -544,7 +544,7 @@ public virtual Response AddTag(string key, string value, C /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -601,7 +601,7 @@ public virtual async Task> SetTagsAsync(IDictiona /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -658,7 +658,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -718,7 +718,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/ComputeFleetExtensions.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/ComputeFleetExtensions.cs index 70ee5bc010ec..dd85a3caff95 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/ComputeFleetExtensions.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/ComputeFleetExtensions.cs @@ -81,7 +81,7 @@ public static ComputeFleetCollection GetComputeFleets(this ResourceGroupResource /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -119,7 +119,7 @@ public static async Task> GetComputeFleetAsync(th /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -157,7 +157,7 @@ public static Response GetComputeFleet(this ResourceGroupR /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -193,7 +193,7 @@ public static AsyncPageable GetComputeFleetsAsync(this Sub /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetResourceGroupResource.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetResourceGroupResource.cs index f1d8341de4ee..6af1ac652dc0 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetResourceGroupResource.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual ComputeFleetCollection GetComputeFleets() /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetComputeFleetAsync(s /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetSubscriptionResource.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetSubscriptionResource.cs index 76dd9cbeec5d..9de02268efb1 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetSubscriptionResource.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetSubscriptionResource.cs @@ -52,7 +52,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -82,7 +82,7 @@ public virtual AsyncPageable GetComputeFleetsAsync(Cancell /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AcceleratorManufacturer.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AcceleratorManufacturer.cs new file mode 100644 index 000000000000..37b5a090a6d2 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AcceleratorManufacturer.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.ComputeFleet.Models +{ + /// Accelerator manufacturers supported by Azure VMs. + public readonly partial struct AcceleratorManufacturer : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AcceleratorManufacturer(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AMDValue = "AMD"; + private const string NvidiaValue = "Nvidia"; + private const string XilinxValue = "Xilinx"; + + /// AMD GpuType. + public static AcceleratorManufacturer AMD { get; } = new AcceleratorManufacturer(AMDValue); + /// Nvidia GpuType. + public static AcceleratorManufacturer Nvidia { get; } = new AcceleratorManufacturer(NvidiaValue); + /// Xilinx GpuType. + public static AcceleratorManufacturer Xilinx { get; } = new AcceleratorManufacturer(XilinxValue); + /// Determines if two values are the same. + public static bool operator ==(AcceleratorManufacturer left, AcceleratorManufacturer right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AcceleratorManufacturer left, AcceleratorManufacturer right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AcceleratorManufacturer(string value) => new AcceleratorManufacturer(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AcceleratorManufacturer other && Equals(other); + /// + public bool Equals(AcceleratorManufacturer other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AcceleratorType.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AcceleratorType.cs new file mode 100644 index 000000000000..c28c55d1858f --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AcceleratorType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// Accelerator types supported by Azure VMs. + public readonly partial struct AcceleratorType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AcceleratorType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string GPUValue = "GPU"; + private const string FPGAValue = "FPGA"; + + /// GPU Accelerator. + public static AcceleratorType GPU { get; } = new AcceleratorType(GPUValue); + /// FPGA Accelerator. + public static AcceleratorType FPGA { get; } = new AcceleratorType(FPGAValue); + /// Determines if two values are the same. + public static bool operator ==(AcceleratorType left, AcceleratorType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AcceleratorType left, AcceleratorType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AcceleratorType(string value) => new AcceleratorType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AcceleratorType other && Equals(other); + /// + public bool Equals(AcceleratorType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalCapabilities.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalCapabilities.Serialization.cs new file mode 100644 index 000000000000..23c586c07cdc --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalCapabilities.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + public partial class AdditionalCapabilities : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AdditionalCapabilities)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(UltraSSDEnabled)) + { + writer.WritePropertyName("ultraSSDEnabled"u8); + writer.WriteBooleanValue(UltraSSDEnabled.Value); + } + if (Optional.IsDefined(HibernationEnabled)) + { + writer.WritePropertyName("hibernationEnabled"u8); + writer.WriteBooleanValue(HibernationEnabled.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AdditionalCapabilities IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AdditionalCapabilities)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAdditionalCapabilities(document.RootElement, options); + } + + internal static AdditionalCapabilities DeserializeAdditionalCapabilities(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? ultraSSDEnabled = default; + bool? hibernationEnabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ultraSSDEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ultraSSDEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("hibernationEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hibernationEnabled = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AdditionalCapabilities(ultraSSDEnabled, hibernationEnabled, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AdditionalCapabilities)} does not support writing '{options.Format}' format."); + } + } + + AdditionalCapabilities IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAdditionalCapabilities(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AdditionalCapabilities)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalCapabilities.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalCapabilities.cs new file mode 100644 index 000000000000..612bd43856d4 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalCapabilities.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// AdditionalCapabilities for VM. + public partial class AdditionalCapabilities + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted 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" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AdditionalCapabilities() + { + } + + /// Initializes a new instance of . + /// + /// The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. + /// Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. + /// + /// The flag that enables or disables hibernation capability on the VM. + /// Keeps track of any properties unknown to the library. + internal AdditionalCapabilities(bool? ultraSSDEnabled, bool? hibernationEnabled, IDictionary serializedAdditionalRawData) + { + UltraSSDEnabled = ultraSSDEnabled; + HibernationEnabled = hibernationEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. + /// Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. + /// + public bool? UltraSSDEnabled { get; set; } + /// The flag that enables or disables hibernation capability on the VM. + public bool? HibernationEnabled { get; set; } + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalLocationsProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalLocationsProfile.Serialization.cs new file mode 100644 index 000000000000..ea4f5ad7881f --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalLocationsProfile.Serialization.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + internal partial class AdditionalLocationsProfile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AdditionalLocationsProfile)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("locationProfiles"u8); + writer.WriteStartArray(); + foreach (var item in LocationProfiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AdditionalLocationsProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AdditionalLocationsProfile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAdditionalLocationsProfile(document.RootElement, options); + } + + internal static AdditionalLocationsProfile DeserializeAdditionalLocationsProfile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList locationProfiles = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("locationProfiles"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LocationProfile.DeserializeLocationProfile(item, options)); + } + locationProfiles = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AdditionalLocationsProfile(locationProfiles, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AdditionalLocationsProfile)} does not support writing '{options.Format}' format."); + } + } + + AdditionalLocationsProfile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAdditionalLocationsProfile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AdditionalLocationsProfile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalLocationsProfile.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalLocationsProfile.cs new file mode 100644 index 000000000000..77482496b7b3 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalLocationsProfile.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// Represents the configuration for additional locations where Fleet resources may be deployed. + internal partial class AdditionalLocationsProfile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted 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" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The list of location profiles. + /// is null. + public AdditionalLocationsProfile(IEnumerable locationProfiles) + { + Argument.AssertNotNull(locationProfiles, nameof(locationProfiles)); + + LocationProfiles = locationProfiles.ToList(); + } + + /// Initializes a new instance of . + /// The list of location profiles. + /// Keeps track of any properties unknown to the library. + internal AdditionalLocationsProfile(IList locationProfiles, IDictionary serializedAdditionalRawData) + { + LocationProfiles = locationProfiles; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AdditionalLocationsProfile() + { + } + + /// The list of location profiles. + public IList LocationProfiles { get; } + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ArchitectureType.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ArchitectureType.cs new file mode 100644 index 000000000000..4ebb1791cff3 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ArchitectureType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// Architecture types supported by Azure VMs. + public readonly partial struct ArchitectureType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ArchitectureType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ARM64Value = "ARM64"; + private const string X64Value = "X64"; + + /// ARM64 Architecture. + public static ArchitectureType ARM64 { get; } = new ArchitectureType(ARM64Value); + /// X64 Architecture. + public static ArchitectureType X64 { get; } = new ArchitectureType(X64Value); + /// Determines if two values are the same. + public static bool operator ==(ArchitectureType left, ArchitectureType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ArchitectureType left, ArchitectureType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ArchitectureType(string value) => new ArchitectureType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ArchitectureType other && Equals(other); + /// + public bool Equals(ArchitectureType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetComputeProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetComputeProfile.Serialization.cs index 42537962e2a4..b982776a1808 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetComputeProfile.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetComputeProfile.Serialization.cs @@ -46,6 +46,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("platformFaultDomainCount"u8); writer.WriteNumberValue(PlatformFaultDomainCount.Value); } + if (Optional.IsDefined(AdditionalVirtualMachineCapabilities)) + { + writer.WritePropertyName("additionalVirtualMachineCapabilities"u8); + writer.WriteObjectValue(AdditionalVirtualMachineCapabilities, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -86,6 +91,7 @@ internal static ComputeFleetComputeProfile DeserializeComputeFleetComputeProfile ComputeFleetVmProfile baseVirtualMachineProfile = default; string computeApiVersion = default; int? platformFaultDomainCount = default; + AdditionalCapabilities additionalVirtualMachineCapabilities = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -109,13 +115,22 @@ internal static ComputeFleetComputeProfile DeserializeComputeFleetComputeProfile platformFaultDomainCount = property.Value.GetInt32(); continue; } + if (property.NameEquals("additionalVirtualMachineCapabilities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalVirtualMachineCapabilities = AdditionalCapabilities.DeserializeAdditionalCapabilities(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ComputeFleetComputeProfile(baseVirtualMachineProfile, computeApiVersion, platformFaultDomainCount, serializedAdditionalRawData); + return new ComputeFleetComputeProfile(baseVirtualMachineProfile, computeApiVersion, platformFaultDomainCount, additionalVirtualMachineCapabilities, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetComputeProfile.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetComputeProfile.cs index 149c34e12ef4..7522cf268571 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetComputeProfile.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetComputeProfile.cs @@ -68,12 +68,19 @@ public ComputeFleetComputeProfile(ComputeFleetVmProfile baseVirtualMachineProfil /// If not specified, defaults to 1, which represents "Max Spreading" (using as many fault domains as possible). /// This property cannot be updated. /// + /// + /// Specifies VMSS and VM API entity models support two additional capabilities as of today: ultraSSDEnabled and hibernationEnabled. + /// ultraSSDEnabled: Enables UltraSSD_LRS storage account type on the VMSS VMs. + /// hibernationEnabled: Enables the hibernation capability on the VMSS VMs. + /// Default value is null if not specified. This property cannot be updated once set. + /// /// Keeps track of any properties unknown to the library. - internal ComputeFleetComputeProfile(ComputeFleetVmProfile baseVirtualMachineProfile, string computeApiVersion, int? platformFaultDomainCount, IDictionary serializedAdditionalRawData) + internal ComputeFleetComputeProfile(ComputeFleetVmProfile baseVirtualMachineProfile, string computeApiVersion, int? platformFaultDomainCount, AdditionalCapabilities additionalVirtualMachineCapabilities, IDictionary serializedAdditionalRawData) { BaseVirtualMachineProfile = baseVirtualMachineProfile; ComputeApiVersion = computeApiVersion; PlatformFaultDomainCount = platformFaultDomainCount; + AdditionalVirtualMachineCapabilities = additionalVirtualMachineCapabilities; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -97,5 +104,12 @@ internal ComputeFleetComputeProfile() /// This property cannot be updated. /// public int? PlatformFaultDomainCount { get; set; } + /// + /// Specifies VMSS and VM API entity models support two additional capabilities as of today: ultraSSDEnabled and hibernationEnabled. + /// ultraSSDEnabled: Enables UltraSSD_LRS storage account type on the VMSS VMs. + /// hibernationEnabled: Enables the hibernation capability on the VMSS VMs. + /// Default value is null if not specified. This property cannot be updated once set. + /// + public AdditionalCapabilities AdditionalVirtualMachineCapabilities { get; set; } } } diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProperties.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProperties.Serialization.cs index 8d2d9757346e..9f01cd3a63d1 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProperties.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProperties.Serialization.cs @@ -56,6 +56,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + if (Optional.IsDefined(VmAttributes)) + { + writer.WritePropertyName("vmAttributes"u8); + writer.WriteObjectValue(VmAttributes, options); + } + if (Optional.IsDefined(AdditionalLocationsProfile)) + { + writer.WritePropertyName("additionalLocationsProfile"u8); + writer.WriteObjectValue(AdditionalLocationsProfile, options); + } writer.WritePropertyName("computeProfile"u8); writer.WriteObjectValue(ComputeProfile, options); if (options.Format != "W" && Optional.IsDefined(CreatedOn)) @@ -109,6 +119,8 @@ internal static ComputeFleetProperties DeserializeComputeFleetProperties(JsonEle SpotPriorityProfile spotPriorityProfile = default; RegularPriorityProfile regularPriorityProfile = default; IList vmSizesProfile = default; + VmAttributes vmAttributes = default; + AdditionalLocationsProfile additionalLocationsProfile = default; ComputeFleetComputeProfile computeProfile = default; DateTimeOffset? timeCreated = default; string uniqueId = default; @@ -153,6 +165,24 @@ internal static ComputeFleetProperties DeserializeComputeFleetProperties(JsonEle vmSizesProfile = array; continue; } + if (property.NameEquals("vmAttributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vmAttributes = VmAttributes.DeserializeVmAttributes(property.Value, options); + continue; + } + if (property.NameEquals("additionalLocationsProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalLocationsProfile = AdditionalLocationsProfile.DeserializeAdditionalLocationsProfile(property.Value, options); + continue; + } if (property.NameEquals("computeProfile"u8)) { computeProfile = ComputeFleetComputeProfile.DeserializeComputeFleetComputeProfile(property.Value, options); @@ -183,6 +213,8 @@ internal static ComputeFleetProperties DeserializeComputeFleetProperties(JsonEle spotPriorityProfile, regularPriorityProfile, vmSizesProfile, + vmAttributes, + additionalLocationsProfile, computeProfile, timeCreated, uniqueId, diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProperties.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProperties.cs index fe9bffc332da..af497325c432 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProperties.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProperties.cs @@ -64,16 +64,20 @@ public ComputeFleetProperties(IEnumerable vmSizesProf /// Configuration Options for Spot instances in Compute Fleet. /// Configuration Options for Regular instances in Compute Fleet. /// List of VM sizes supported for Compute Fleet. + /// Attribute based Fleet. + /// Represents the configuration for additional locations where Fleet resources may be deployed. /// Compute Profile to use for running user's workloads. /// Specifies the time at which the Compute Fleet is created. /// Specifies the ID which uniquely identifies a Compute Fleet. /// Keeps track of any properties unknown to the library. - internal ComputeFleetProperties(ComputeFleetProvisioningState? provisioningState, SpotPriorityProfile spotPriorityProfile, RegularPriorityProfile regularPriorityProfile, IList vmSizesProfile, ComputeFleetComputeProfile computeProfile, DateTimeOffset? createdOn, string uniqueId, IDictionary serializedAdditionalRawData) + internal ComputeFleetProperties(ComputeFleetProvisioningState? provisioningState, SpotPriorityProfile spotPriorityProfile, RegularPriorityProfile regularPriorityProfile, IList vmSizesProfile, VmAttributes vmAttributes, AdditionalLocationsProfile additionalLocationsProfile, ComputeFleetComputeProfile computeProfile, DateTimeOffset? createdOn, string uniqueId, IDictionary serializedAdditionalRawData) { ProvisioningState = provisioningState; SpotPriorityProfile = spotPriorityProfile; RegularPriorityProfile = regularPriorityProfile; VmSizesProfile = vmSizesProfile; + VmAttributes = vmAttributes; + AdditionalLocationsProfile = additionalLocationsProfile; ComputeProfile = computeProfile; CreatedOn = createdOn; UniqueId = uniqueId; @@ -93,6 +97,17 @@ internal ComputeFleetProperties() public RegularPriorityProfile RegularPriorityProfile { get; set; } /// List of VM sizes supported for Compute Fleet. public IList VmSizesProfile { get; } + /// Attribute based Fleet. + public VmAttributes VmAttributes { get; set; } + /// Represents the configuration for additional locations where Fleet resources may be deployed. + internal AdditionalLocationsProfile AdditionalLocationsProfile { get; set; } + /// The list of location profiles. + public IList AdditionalLocationsLocationProfiles + { + get => AdditionalLocationsProfile is null ? default : AdditionalLocationsProfile.LocationProfiles; + set => AdditionalLocationsProfile = new AdditionalLocationsProfile(value); + } + /// Compute Profile to use for running user's workloads. public ComputeFleetComputeProfile ComputeProfile { get; set; } /// Specifies the time at which the Compute Fleet is created. diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/CpuManufacturer.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/CpuManufacturer.cs new file mode 100644 index 000000000000..e4df71fa76d9 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/CpuManufacturer.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// Cpu Manufacturers supported by Azure VMs. + public readonly partial struct CpuManufacturer : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CpuManufacturer(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string IntelValue = "Intel"; + private const string AMDValue = "AMD"; + private const string MicrosoftValue = "Microsoft"; + private const string AmpereValue = "Ampere"; + + /// Intel CPU. + public static CpuManufacturer Intel { get; } = new CpuManufacturer(IntelValue); + /// AMD CPU. + public static CpuManufacturer AMD { get; } = new CpuManufacturer(AMDValue); + /// Microsoft CPU. + public static CpuManufacturer Microsoft { get; } = new CpuManufacturer(MicrosoftValue); + /// Ampere CPU. + public static CpuManufacturer Ampere { get; } = new CpuManufacturer(AmpereValue); + /// Determines if two values are the same. + public static bool operator ==(CpuManufacturer left, CpuManufacturer right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CpuManufacturer left, CpuManufacturer right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CpuManufacturer(string value) => new CpuManufacturer(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CpuManufacturer other && Equals(other); + /// + public bool Equals(CpuManufacturer other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/LocalStorageDiskType.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/LocalStorageDiskType.cs new file mode 100644 index 000000000000..c6b92dc9ce58 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/LocalStorageDiskType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// Different kind of Local storage disk types supported by Azure VMs. + public readonly partial struct LocalStorageDiskType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public LocalStorageDiskType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string HDDValue = "HDD"; + private const string SSDValue = "SSD"; + + /// HDD DiskType. + public static LocalStorageDiskType HDD { get; } = new LocalStorageDiskType(HDDValue); + /// SDD DiskType. + public static LocalStorageDiskType SSD { get; } = new LocalStorageDiskType(SSDValue); + /// Determines if two values are the same. + public static bool operator ==(LocalStorageDiskType left, LocalStorageDiskType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LocalStorageDiskType left, LocalStorageDiskType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator LocalStorageDiskType(string value) => new LocalStorageDiskType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LocalStorageDiskType other && Equals(other); + /// + public bool Equals(LocalStorageDiskType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/LocationProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/LocationProfile.Serialization.cs new file mode 100644 index 000000000000..256f1aa42810 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/LocationProfile.Serialization.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + public partial class LocationProfile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LocationProfile)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + if (Optional.IsDefined(VirtualMachineProfileOverride)) + { + writer.WritePropertyName("virtualMachineProfileOverride"u8); + writer.WriteObjectValue(VirtualMachineProfileOverride, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LocationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LocationProfile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLocationProfile(document.RootElement, options); + } + + internal static LocationProfile DeserializeLocationProfile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string location = default; + ComputeFleetVmProfile virtualMachineProfileOverride = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("virtualMachineProfileOverride"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + virtualMachineProfileOverride = ComputeFleetVmProfile.DeserializeComputeFleetVmProfile(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LocationProfile(location, virtualMachineProfileOverride, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LocationProfile)} does not support writing '{options.Format}' format."); + } + } + + LocationProfile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeLocationProfile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LocationProfile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/LocationProfile.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/LocationProfile.cs new file mode 100644 index 000000000000..28c2bdeaa0d4 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/LocationProfile.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// Represents the profile for a single additional location in the Fleet. The location and the virtualMachineProfileOverride (optional). + public partial class LocationProfile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted 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" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ARM location name of the additional region. If LocationProfile is specified, then location is required. + /// is null. + public LocationProfile(string location) + { + Argument.AssertNotNull(location, nameof(location)); + + Location = location; + } + + /// Initializes a new instance of . + /// The ARM location name of the additional region. If LocationProfile is specified, then location is required. + /// + /// An override for computeProfile.baseVirtualMachineProfile specific to this region. + /// This override is merged with the base virtual machine profile to define the final virtual machine profile for the resources deployed in this location. + /// + /// Keeps track of any properties unknown to the library. + internal LocationProfile(string location, ComputeFleetVmProfile virtualMachineProfileOverride, IDictionary serializedAdditionalRawData) + { + Location = location; + VirtualMachineProfileOverride = virtualMachineProfileOverride; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal LocationProfile() + { + } + + /// The ARM location name of the additional region. If LocationProfile is specified, then location is required. + public string Location { get; set; } + /// + /// An override for computeProfile.baseVirtualMachineProfile specific to this region. + /// This override is merged with the base virtual machine profile to define the final virtual machine profile for the resources deployed in this location. + /// + public ComputeFleetVmProfile VirtualMachineProfileOverride { get; set; } + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributeMinMaxDouble.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributeMinMaxDouble.Serialization.cs new file mode 100644 index 000000000000..1112b897c834 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributeMinMaxDouble.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + public partial class VmAttributeMinMaxDouble : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VmAttributeMinMaxDouble)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Min)) + { + writer.WritePropertyName("min"u8); + writer.WriteNumberValue(Min.Value); + } + if (Optional.IsDefined(Max)) + { + writer.WritePropertyName("max"u8); + writer.WriteNumberValue(Max.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VmAttributeMinMaxDouble IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VmAttributeMinMaxDouble)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVmAttributeMinMaxDouble(document.RootElement, options); + } + + internal static VmAttributeMinMaxDouble DeserializeVmAttributeMinMaxDouble(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + double? min = default; + double? max = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("min"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + min = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("max"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + max = property.Value.GetDouble(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VmAttributeMinMaxDouble(min, max, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VmAttributeMinMaxDouble)} does not support writing '{options.Format}' format."); + } + } + + VmAttributeMinMaxDouble IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeVmAttributeMinMaxDouble(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VmAttributeMinMaxDouble)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributeMinMaxDouble.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributeMinMaxDouble.cs new file mode 100644 index 000000000000..546f1f452f6f --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributeMinMaxDouble.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// VMAttributes using double values. + public partial class VmAttributeMinMaxDouble + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted 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" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public VmAttributeMinMaxDouble() + { + } + + /// Initializes a new instance of . + /// Minimum value. default 0. Double.MinValue(). + /// Maximum value. Double.MaxValue(1.7976931348623157E+308). + /// Keeps track of any properties unknown to the library. + internal VmAttributeMinMaxDouble(double? min, double? max, IDictionary serializedAdditionalRawData) + { + Min = min; + Max = max; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Minimum value. default 0. Double.MinValue(). + public double? Min { get; set; } + /// Maximum value. Double.MaxValue(1.7976931348623157E+308). + public double? Max { get; set; } + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributeMinMaxInteger.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributeMinMaxInteger.Serialization.cs new file mode 100644 index 000000000000..5222d1618a45 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributeMinMaxInteger.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + public partial class VmAttributeMinMaxInteger : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VmAttributeMinMaxInteger)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Min)) + { + writer.WritePropertyName("min"u8); + writer.WriteNumberValue(Min.Value); + } + if (Optional.IsDefined(Max)) + { + writer.WritePropertyName("max"u8); + writer.WriteNumberValue(Max.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VmAttributeMinMaxInteger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VmAttributeMinMaxInteger)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVmAttributeMinMaxInteger(document.RootElement, options); + } + + internal static VmAttributeMinMaxInteger DeserializeVmAttributeMinMaxInteger(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? min = default; + int? max = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("min"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + min = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("max"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + max = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VmAttributeMinMaxInteger(min, max, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VmAttributeMinMaxInteger)} does not support writing '{options.Format}' format."); + } + } + + VmAttributeMinMaxInteger IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeVmAttributeMinMaxInteger(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VmAttributeMinMaxInteger)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributeMinMaxInteger.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributeMinMaxInteger.cs new file mode 100644 index 000000000000..a5dee794bd70 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributeMinMaxInteger.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// While retrieving VMSizes from CRS, Min = 0 (uint.MinValue) if not specified, Max = 4294967295 (uint.MaxValue) if not specified. This allows to filter VMAttributes on all available VMSizes. + public partial class VmAttributeMinMaxInteger + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted 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" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public VmAttributeMinMaxInteger() + { + } + + /// Initializes a new instance of . + /// Min VMSize from CRS, Min = 0 (uint.MinValue) if not specified. + /// Max VMSize from CRS, Max = 4294967295 (uint.MaxValue) if not specified. + /// Keeps track of any properties unknown to the library. + internal VmAttributeMinMaxInteger(int? min, int? max, IDictionary serializedAdditionalRawData) + { + Min = min; + Max = max; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Min VMSize from CRS, Min = 0 (uint.MinValue) if not specified. + public int? Min { get; set; } + /// Max VMSize from CRS, Max = 4294967295 (uint.MaxValue) if not specified. + public int? Max { get; set; } + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributeSupport.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributeSupport.cs new file mode 100644 index 000000000000..e841ff15a3e9 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributeSupport.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.ComputeFleet.Models +{ + /// VMSizes supported by Azure VMs. Included is a union of Excluded and Required. + public readonly partial struct VmAttributeSupport : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public VmAttributeSupport(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ExcludedValue = "Excluded"; + private const string IncludedValue = "Included"; + private const string RequiredValue = "Required"; + + /// All VMSizes having the feature support will be excluded. + public static VmAttributeSupport Excluded { get; } = new VmAttributeSupport(ExcludedValue); + /// VMSizes that have the feature support and that do not have the feature support will be used. Included is a union of Excluded and Required. + public static VmAttributeSupport Included { get; } = new VmAttributeSupport(IncludedValue); + /// Only the VMSizes having the feature support will be used. + public static VmAttributeSupport Required { get; } = new VmAttributeSupport(RequiredValue); + /// Determines if two values are the same. + public static bool operator ==(VmAttributeSupport left, VmAttributeSupport right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VmAttributeSupport left, VmAttributeSupport right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator VmAttributeSupport(string value) => new VmAttributeSupport(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VmAttributeSupport other && Equals(other); + /// + public bool Equals(VmAttributeSupport other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributes.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributes.Serialization.cs new file mode 100644 index 000000000000..1ef358883235 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributes.Serialization.cs @@ -0,0 +1,495 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + public partial class VmAttributes : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VmAttributes)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("vCpuCount"u8); + writer.WriteObjectValue(VCpuCount, options); + writer.WritePropertyName("memoryInGiB"u8); + writer.WriteObjectValue(MemoryInGiB, options); + if (Optional.IsDefined(MemoryInGiBPerVCpu)) + { + writer.WritePropertyName("memoryInGiBPerVCpu"u8); + writer.WriteObjectValue(MemoryInGiBPerVCpu, options); + } + if (Optional.IsDefined(LocalStorageSupport)) + { + writer.WritePropertyName("localStorageSupport"u8); + writer.WriteStringValue(LocalStorageSupport.Value.ToString()); + } + if (Optional.IsDefined(LocalStorageInGiB)) + { + writer.WritePropertyName("localStorageInGiB"u8); + writer.WriteObjectValue(LocalStorageInGiB, options); + } + if (Optional.IsCollectionDefined(LocalStorageDiskTypes)) + { + writer.WritePropertyName("localStorageDiskTypes"u8); + writer.WriteStartArray(); + foreach (var item in LocalStorageDiskTypes) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DataDiskCount)) + { + writer.WritePropertyName("dataDiskCount"u8); + writer.WriteObjectValue(DataDiskCount, options); + } + if (Optional.IsDefined(NetworkInterfaceCount)) + { + writer.WritePropertyName("networkInterfaceCount"u8); + writer.WriteObjectValue(NetworkInterfaceCount, options); + } + if (Optional.IsDefined(NetworkBandwidthInMbps)) + { + writer.WritePropertyName("networkBandwidthInMbps"u8); + writer.WriteObjectValue(NetworkBandwidthInMbps, options); + } + if (Optional.IsDefined(RdmaSupport)) + { + writer.WritePropertyName("rdmaSupport"u8); + writer.WriteStringValue(RdmaSupport.Value.ToString()); + } + if (Optional.IsDefined(RdmaNetworkInterfaceCount)) + { + writer.WritePropertyName("rdmaNetworkInterfaceCount"u8); + writer.WriteObjectValue(RdmaNetworkInterfaceCount, options); + } + if (Optional.IsDefined(AcceleratorSupport)) + { + writer.WritePropertyName("acceleratorSupport"u8); + writer.WriteStringValue(AcceleratorSupport.Value.ToString()); + } + if (Optional.IsCollectionDefined(AcceleratorManufacturers)) + { + writer.WritePropertyName("acceleratorManufacturers"u8); + writer.WriteStartArray(); + foreach (var item in AcceleratorManufacturers) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(AcceleratorTypes)) + { + writer.WritePropertyName("acceleratorTypes"u8); + writer.WriteStartArray(); + foreach (var item in AcceleratorTypes) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AcceleratorCount)) + { + writer.WritePropertyName("acceleratorCount"u8); + writer.WriteObjectValue(AcceleratorCount, options); + } + if (Optional.IsCollectionDefined(VmCategories)) + { + writer.WritePropertyName("vmCategories"u8); + writer.WriteStartArray(); + foreach (var item in VmCategories) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ArchitectureTypes)) + { + writer.WritePropertyName("architectureTypes"u8); + writer.WriteStartArray(); + foreach (var item in ArchitectureTypes) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(CpuManufacturers)) + { + writer.WritePropertyName("cpuManufacturers"u8); + writer.WriteStartArray(); + foreach (var item in CpuManufacturers) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(BurstableSupport)) + { + writer.WritePropertyName("burstableSupport"u8); + writer.WriteStringValue(BurstableSupport.Value.ToString()); + } + if (Optional.IsCollectionDefined(ExcludedVmSizes)) + { + writer.WritePropertyName("excludedVMSizes"u8); + writer.WriteStartArray(); + foreach (var item in ExcludedVmSizes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VmAttributes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VmAttributes)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVmAttributes(document.RootElement, options); + } + + internal static VmAttributes DeserializeVmAttributes(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + VmAttributeMinMaxInteger vCpuCount = default; + VmAttributeMinMaxDouble memoryInGiB = default; + VmAttributeMinMaxDouble memoryInGiBPerVCpu = default; + VmAttributeSupport? localStorageSupport = default; + VmAttributeMinMaxDouble localStorageInGiB = default; + IList localStorageDiskTypes = default; + VmAttributeMinMaxInteger dataDiskCount = default; + VmAttributeMinMaxInteger networkInterfaceCount = default; + VmAttributeMinMaxDouble networkBandwidthInMbps = default; + VmAttributeSupport? rdmaSupport = default; + VmAttributeMinMaxInteger rdmaNetworkInterfaceCount = default; + VmAttributeSupport? acceleratorSupport = default; + IList acceleratorManufacturers = default; + IList acceleratorTypes = default; + VmAttributeMinMaxInteger acceleratorCount = default; + IList vmCategories = default; + IList architectureTypes = default; + IList cpuManufacturers = default; + VmAttributeSupport? burstableSupport = default; + IList excludedVmSizes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vCpuCount"u8)) + { + vCpuCount = VmAttributeMinMaxInteger.DeserializeVmAttributeMinMaxInteger(property.Value, options); + continue; + } + if (property.NameEquals("memoryInGiB"u8)) + { + memoryInGiB = VmAttributeMinMaxDouble.DeserializeVmAttributeMinMaxDouble(property.Value, options); + continue; + } + if (property.NameEquals("memoryInGiBPerVCpu"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memoryInGiBPerVCpu = VmAttributeMinMaxDouble.DeserializeVmAttributeMinMaxDouble(property.Value, options); + continue; + } + if (property.NameEquals("localStorageSupport"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localStorageSupport = new VmAttributeSupport(property.Value.GetString()); + continue; + } + if (property.NameEquals("localStorageInGiB"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localStorageInGiB = VmAttributeMinMaxDouble.DeserializeVmAttributeMinMaxDouble(property.Value, options); + continue; + } + if (property.NameEquals("localStorageDiskTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new LocalStorageDiskType(item.GetString())); + } + localStorageDiskTypes = array; + continue; + } + if (property.NameEquals("dataDiskCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataDiskCount = VmAttributeMinMaxInteger.DeserializeVmAttributeMinMaxInteger(property.Value, options); + continue; + } + if (property.NameEquals("networkInterfaceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkInterfaceCount = VmAttributeMinMaxInteger.DeserializeVmAttributeMinMaxInteger(property.Value, options); + continue; + } + if (property.NameEquals("networkBandwidthInMbps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkBandwidthInMbps = VmAttributeMinMaxDouble.DeserializeVmAttributeMinMaxDouble(property.Value, options); + continue; + } + if (property.NameEquals("rdmaSupport"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rdmaSupport = new VmAttributeSupport(property.Value.GetString()); + continue; + } + if (property.NameEquals("rdmaNetworkInterfaceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rdmaNetworkInterfaceCount = VmAttributeMinMaxInteger.DeserializeVmAttributeMinMaxInteger(property.Value, options); + continue; + } + if (property.NameEquals("acceleratorSupport"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + acceleratorSupport = new VmAttributeSupport(property.Value.GetString()); + continue; + } + if (property.NameEquals("acceleratorManufacturers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new AcceleratorManufacturer(item.GetString())); + } + acceleratorManufacturers = array; + continue; + } + if (property.NameEquals("acceleratorTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new AcceleratorType(item.GetString())); + } + acceleratorTypes = array; + continue; + } + if (property.NameEquals("acceleratorCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + acceleratorCount = VmAttributeMinMaxInteger.DeserializeVmAttributeMinMaxInteger(property.Value, options); + continue; + } + if (property.NameEquals("vmCategories"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new VmCategory(item.GetString())); + } + vmCategories = array; + continue; + } + if (property.NameEquals("architectureTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new ArchitectureType(item.GetString())); + } + architectureTypes = array; + continue; + } + if (property.NameEquals("cpuManufacturers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new CpuManufacturer(item.GetString())); + } + cpuManufacturers = array; + continue; + } + if (property.NameEquals("burstableSupport"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + burstableSupport = new VmAttributeSupport(property.Value.GetString()); + continue; + } + if (property.NameEquals("excludedVMSizes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + excludedVmSizes = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VmAttributes( + vCpuCount, + memoryInGiB, + memoryInGiBPerVCpu, + localStorageSupport, + localStorageInGiB, + localStorageDiskTypes ?? new ChangeTrackingList(), + dataDiskCount, + networkInterfaceCount, + networkBandwidthInMbps, + rdmaSupport, + rdmaNetworkInterfaceCount, + acceleratorSupport, + acceleratorManufacturers ?? new ChangeTrackingList(), + acceleratorTypes ?? new ChangeTrackingList(), + acceleratorCount, + vmCategories ?? new ChangeTrackingList(), + architectureTypes ?? new ChangeTrackingList(), + cpuManufacturers ?? new ChangeTrackingList(), + burstableSupport, + excludedVmSizes ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VmAttributes)} does not support writing '{options.Format}' format."); + } + } + + VmAttributes IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeVmAttributes(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VmAttributes)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributes.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributes.cs new file mode 100644 index 000000000000..59c3f74fd137 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmAttributes.cs @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// VMAttributes that will be used to filter VMSizes which will be used to build Fleet. + public partial class VmAttributes + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted 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" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The range of vCpuCount specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified. + /// The range of memory specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified. + /// or is null. + public VmAttributes(VmAttributeMinMaxInteger vCpuCount, VmAttributeMinMaxDouble memoryInGiB) + { + Argument.AssertNotNull(vCpuCount, nameof(vCpuCount)); + Argument.AssertNotNull(memoryInGiB, nameof(memoryInGiB)); + + VCpuCount = vCpuCount; + MemoryInGiB = memoryInGiB; + LocalStorageDiskTypes = new ChangeTrackingList(); + AcceleratorManufacturers = new ChangeTrackingList(); + AcceleratorTypes = new ChangeTrackingList(); + VmCategories = new ChangeTrackingList(); + ArchitectureTypes = new ChangeTrackingList(); + CpuManufacturers = new ChangeTrackingList(); + ExcludedVmSizes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The range of vCpuCount specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified. + /// The range of memory specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified. + /// The range of memory in GiB per vCPU specified from min to max. Optional parameter. Either Min or Max is required if specified. + /// + /// Specifies whether the VMSize supporting local storage should be used to build Fleet or not. + /// Included - Default if not specified as most Azure VMs support local storage. + /// + /// + /// LocalStorageSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If localStorageSupport is "Excluded", this VMAttribute can not be used. + /// + /// + /// The local storage disk types specified as a list. LocalStorageSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If localStorageSupport is "Excluded", this VMAttribute can not be used. + /// + /// The range of data disk count specified from Min to Max. Optional parameter. Either Min or Max is required if specified. + /// The range of network interface count specified from Min to Max. Optional parameter. Either Min or Max is required if specified. + /// The range of network bandwidth in Mbps specified from Min to Max. Optional parameter. Either Min or Max is required if specified. + /// Specifies whether the VMSize supporting RDMA (Remote Direct Memory Access) should be used to build Fleet or not. + /// + /// The range of RDMA (Remote Direct Memory Access) network interface count specified from Min to Max. Optional parameter. Either Min or Max is required if specified. + /// rdmaSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If rdmaSupport is "Excluded", this VMAttribute can not be used. + /// + /// + /// Specifies whether the VMSize supporting accelerator should be used to build Fleet or not. + /// acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If acceleratorSupport is "Excluded", this VMAttribute can not be used. + /// + /// + /// The accelerator manufacturers specified as a list. + /// acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If acceleratorSupport is "Excluded", this VMAttribute can not be used. + /// + /// + /// The accelerator types specified as a list. acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If acceleratorSupport is "Excluded", this VMAttribute can not be used. + /// + /// + /// The range of accelerator count specified from min to max. Optional parameter. Either Min or Max is required if specified. + /// acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If acceleratorSupport is "Excluded", this VMAttribute can not be used. + /// + /// The VM category specified as a list. Optional parameter. + /// The VM architecture types specified as a list. Optional parameter. + /// The VM CPU manufacturers specified as a list. Optional parameter. + /// Specifies whether the VMSize supporting burstable capability should be used to build Fleet or not. + /// Specifies which VMSizes should be excluded while building Fleet. Optional parameter. + /// Keeps track of any properties unknown to the library. + internal VmAttributes(VmAttributeMinMaxInteger vCpuCount, VmAttributeMinMaxDouble memoryInGiB, VmAttributeMinMaxDouble memoryInGiBPerVCpu, VmAttributeSupport? localStorageSupport, VmAttributeMinMaxDouble localStorageInGiB, IList localStorageDiskTypes, VmAttributeMinMaxInteger dataDiskCount, VmAttributeMinMaxInteger networkInterfaceCount, VmAttributeMinMaxDouble networkBandwidthInMbps, VmAttributeSupport? rdmaSupport, VmAttributeMinMaxInteger rdmaNetworkInterfaceCount, VmAttributeSupport? acceleratorSupport, IList acceleratorManufacturers, IList acceleratorTypes, VmAttributeMinMaxInteger acceleratorCount, IList vmCategories, IList architectureTypes, IList cpuManufacturers, VmAttributeSupport? burstableSupport, IList excludedVmSizes, IDictionary serializedAdditionalRawData) + { + VCpuCount = vCpuCount; + MemoryInGiB = memoryInGiB; + MemoryInGiBPerVCpu = memoryInGiBPerVCpu; + LocalStorageSupport = localStorageSupport; + LocalStorageInGiB = localStorageInGiB; + LocalStorageDiskTypes = localStorageDiskTypes; + DataDiskCount = dataDiskCount; + NetworkInterfaceCount = networkInterfaceCount; + NetworkBandwidthInMbps = networkBandwidthInMbps; + RdmaSupport = rdmaSupport; + RdmaNetworkInterfaceCount = rdmaNetworkInterfaceCount; + AcceleratorSupport = acceleratorSupport; + AcceleratorManufacturers = acceleratorManufacturers; + AcceleratorTypes = acceleratorTypes; + AcceleratorCount = acceleratorCount; + VmCategories = vmCategories; + ArchitectureTypes = architectureTypes; + CpuManufacturers = cpuManufacturers; + BurstableSupport = burstableSupport; + ExcludedVmSizes = excludedVmSizes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal VmAttributes() + { + } + + /// The range of vCpuCount specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified. + public VmAttributeMinMaxInteger VCpuCount { get; set; } + /// The range of memory specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified. + public VmAttributeMinMaxDouble MemoryInGiB { get; set; } + /// The range of memory in GiB per vCPU specified from min to max. Optional parameter. Either Min or Max is required if specified. + public VmAttributeMinMaxDouble MemoryInGiBPerVCpu { get; set; } + /// + /// Specifies whether the VMSize supporting local storage should be used to build Fleet or not. + /// Included - Default if not specified as most Azure VMs support local storage. + /// + public VmAttributeSupport? LocalStorageSupport { get; set; } + /// + /// LocalStorageSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If localStorageSupport is "Excluded", this VMAttribute can not be used. + /// + public VmAttributeMinMaxDouble LocalStorageInGiB { get; set; } + /// + /// The local storage disk types specified as a list. LocalStorageSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If localStorageSupport is "Excluded", this VMAttribute can not be used. + /// + public IList LocalStorageDiskTypes { get; } + /// The range of data disk count specified from Min to Max. Optional parameter. Either Min or Max is required if specified. + public VmAttributeMinMaxInteger DataDiskCount { get; set; } + /// The range of network interface count specified from Min to Max. Optional parameter. Either Min or Max is required if specified. + public VmAttributeMinMaxInteger NetworkInterfaceCount { get; set; } + /// The range of network bandwidth in Mbps specified from Min to Max. Optional parameter. Either Min or Max is required if specified. + public VmAttributeMinMaxDouble NetworkBandwidthInMbps { get; set; } + /// Specifies whether the VMSize supporting RDMA (Remote Direct Memory Access) should be used to build Fleet or not. + public VmAttributeSupport? RdmaSupport { get; set; } + /// + /// The range of RDMA (Remote Direct Memory Access) network interface count specified from Min to Max. Optional parameter. Either Min or Max is required if specified. + /// rdmaSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If rdmaSupport is "Excluded", this VMAttribute can not be used. + /// + public VmAttributeMinMaxInteger RdmaNetworkInterfaceCount { get; set; } + /// + /// Specifies whether the VMSize supporting accelerator should be used to build Fleet or not. + /// acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If acceleratorSupport is "Excluded", this VMAttribute can not be used. + /// + public VmAttributeSupport? AcceleratorSupport { get; set; } + /// + /// The accelerator manufacturers specified as a list. + /// acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If acceleratorSupport is "Excluded", this VMAttribute can not be used. + /// + public IList AcceleratorManufacturers { get; } + /// + /// The accelerator types specified as a list. acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If acceleratorSupport is "Excluded", this VMAttribute can not be used. + /// + public IList AcceleratorTypes { get; } + /// + /// The range of accelerator count specified from min to max. Optional parameter. Either Min or Max is required if specified. + /// acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If acceleratorSupport is "Excluded", this VMAttribute can not be used. + /// + public VmAttributeMinMaxInteger AcceleratorCount { get; set; } + /// The VM category specified as a list. Optional parameter. + public IList VmCategories { get; } + /// The VM architecture types specified as a list. Optional parameter. + public IList ArchitectureTypes { get; } + /// The VM CPU manufacturers specified as a list. Optional parameter. + public IList CpuManufacturers { get; } + /// Specifies whether the VMSize supporting burstable capability should be used to build Fleet or not. + public VmAttributeSupport? BurstableSupport { get; set; } + /// Specifies which VMSizes should be excluded while building Fleet. Optional parameter. + public IList ExcludedVmSizes { get; } + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmCategory.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmCategory.cs new file mode 100644 index 000000000000..90fbf2910a33 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VmCategory.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// + /// VMCategories defined for Azure VMs. + /// See: https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/overview?tabs=breakdownseries%2Cgeneralsizelist%2Ccomputesizelist%2Cmemorysizelist%2Cstoragesizelist%2Cgpusizelist%2Cfpgasizelist%2Chpcsizelist#general-purpose + /// + public readonly partial struct VmCategory : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public VmCategory(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string GeneralPurposeValue = "GeneralPurpose"; + private const string ComputeOptimizedValue = "ComputeOptimized"; + private const string MemoryOptimizedValue = "MemoryOptimized"; + private const string StorageOptimizedValue = "StorageOptimized"; + private const string GpuAcceleratedValue = "GpuAccelerated"; + private const string FpgaAcceleratedValue = "FpgaAccelerated"; + private const string HighPerformanceComputeValue = "HighPerformanceCompute"; + + /// General purpose VM sizes provide balanced CPU-to-memory ratio. Ideal for testing and development, small to medium databases, and low to medium traffic web servers. + public static VmCategory GeneralPurpose { get; } = new VmCategory(GeneralPurposeValue); + /// Compute optimized VM sizes have a high CPU-to-memory ratio. These sizes are good for medium traffic web servers, network appliances, batch processes, and application servers. + public static VmCategory ComputeOptimized { get; } = new VmCategory(ComputeOptimizedValue); + /// Memory optimized VM sizes offer a high memory-to-CPU ratio that is great for relational database servers, medium to large caches, and in-memory analytics. + public static VmCategory MemoryOptimized { get; } = new VmCategory(MemoryOptimizedValue); + /// + /// Storage optimized virtual machine (VM) sizes offer high disk throughput and IO, and are ideal for Big Data, SQL, NoSQL databases, data warehousing, and large transactional databases. + /// Examples include Cassandra, MongoDB, Cloudera, and Redis. + /// + public static VmCategory StorageOptimized { get; } = new VmCategory(StorageOptimizedValue); + /// + /// GPU optimized VM sizes are specialized virtual machines available with single, multiple, or fractional GPUs. + /// These sizes are designed for compute-intensive, graphics-intensive, and visualization workloads. + /// + public static VmCategory GpuAccelerated { get; } = new VmCategory(GpuAcceleratedValue); + /// + /// FPGA optimized VM sizes are specialized virtual machines available with single or multiple FPGA. + /// These sizes are designed for compute-intensive workloads. This article provides information about the number and type of FPGA, vCPUs, data disks, and NICs. + /// Storage throughput and network bandwidth are also included for each size in this grouping. + /// + public static VmCategory FpgaAccelerated { get; } = new VmCategory(FpgaAcceleratedValue); + /// + /// Azure High Performance Compute VMs are optimized for various HPC workloads such as computational fluid dynamics, finite element analysis, frontend and backend EDA, + /// rendering, molecular dynamics, computational geo science, weather simulation, and financial risk analysis. + /// + public static VmCategory HighPerformanceCompute { get; } = new VmCategory(HighPerformanceComputeValue); + /// Determines if two values are the same. + public static bool operator ==(VmCategory left, VmCategory right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VmCategory left, VmCategory right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator VmCategory(string value) => new VmCategory(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VmCategory other && Equals(other); + /// + public bool Equals(VmCategory other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/RestOperations/FleetsRestOperations.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/RestOperations/FleetsRestOperations.cs index 497e8c9acbcd..1653b36f882f 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/RestOperations/FleetsRestOperations.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/RestOperations/FleetsRestOperations.cs @@ -32,7 +32,7 @@ public FleetsRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-01-preview"; + _apiVersion = apiVersion ?? "2024-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml index b5e602272d0c..7a11e830c0ae 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/azurefleet/AzureFleet.Management -commit: c0a15f4623eb11f745f890089f3d46d8a538524f -repo: Azure/azure-rest-api-specs \ No newline at end of file +commit: 813a8a8d96562a3aa44ae14753cc9fac78f62ccc +repo: Azure/azure-rest-api-specs +additionalDirectories: