From 1d9d1ae5279c1eaa7ced51d5f1594f145967be10 Mon Sep 17 00:00:00 2001 From: Wei Hu Date: Wed, 31 May 2023 16:58:36 +0800 Subject: [PATCH] Enable model factory for hci --- .../Azure.ResourceManager.Hci/CHANGELOG.md | 1 + ...zure.ResourceManager.Hci.netstandard2.0.cs | 22 ++ .../src/Generated/ArmHciModelFactory.cs | 370 ++++++++++++++++++ .../Azure.ResourceManager.Hci/src/autorest.md | 1 - 4 files changed, 393 insertions(+), 1 deletion(-) create mode 100644 sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/ArmHciModelFactory.cs diff --git a/sdk/azurestackhci/Azure.ResourceManager.Hci/CHANGELOG.md b/sdk/azurestackhci/Azure.ResourceManager.Hci/CHANGELOG.md index ccd58c79035a1..42321f3dbb85e 100644 --- a/sdk/azurestackhci/Azure.ResourceManager.Hci/CHANGELOG.md +++ b/sdk/azurestackhci/Azure.ResourceManager.Hci/CHANGELOG.md @@ -5,6 +5,7 @@ ### Feature Added - Upgraded API version to 2023-02-01. +- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). ## 1.0.1 (2023-02-16) diff --git a/sdk/azurestackhci/Azure.ResourceManager.Hci/api/Azure.ResourceManager.Hci.netstandard2.0.cs b/sdk/azurestackhci/Azure.ResourceManager.Hci/api/Azure.ResourceManager.Hci.netstandard2.0.cs index 50a115a8c2955..9aa54c7b25d04 100644 --- a/sdk/azurestackhci/Azure.ResourceManager.Hci/api/Azure.ResourceManager.Hci.netstandard2.0.cs +++ b/sdk/azurestackhci/Azure.ResourceManager.Hci/api/Azure.ResourceManager.Hci.netstandard2.0.cs @@ -520,6 +520,28 @@ public ArcSettingPatch() { } public System.BinaryData ConnectivityProperties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } } + public static partial class ArmHciModelFactory + { + public static Azure.ResourceManager.Hci.ArcExtensionData ArcExtensionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Hci.Models.HciProvisioningState? provisioningState = default(Azure.ResourceManager.Hci.Models.HciProvisioningState?), Azure.ResourceManager.Hci.Models.ArcExtensionAggregateState? aggregateState = default(Azure.ResourceManager.Hci.Models.ArcExtensionAggregateState?), System.Collections.Generic.IEnumerable perNodeExtensionDetails = null, string forceUpdateTag = null, string publisher = null, string arcExtensionType = null, string typeHandlerVersion = null, bool? shouldAutoUpgradeMinorVersion = default(bool?), System.BinaryData settings = null, System.BinaryData protectedSettings = null, bool? enableAutomaticUpgrade = default(bool?)) { throw null; } + public static Azure.ResourceManager.Hci.Models.ArcIdentityResult ArcIdentityResult(System.Guid? arcApplicationClientId = default(System.Guid?), System.Guid? arcApplicationTenantId = default(System.Guid?), System.Guid? arcServicePrincipalObjectId = default(System.Guid?), System.Guid? arcApplicationObjectId = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.Hci.Models.ArcPasswordCredential ArcPasswordCredential(string secretText = null, string keyId = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.Hci.ArcSettingData ArcSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Hci.Models.HciProvisioningState? provisioningState = default(Azure.ResourceManager.Hci.Models.HciProvisioningState?), string arcInstanceResourceGroup = null, System.Guid? arcApplicationClientId = default(System.Guid?), System.Guid? arcApplicationTenantId = default(System.Guid?), System.Guid? arcServicePrincipalObjectId = default(System.Guid?), System.Guid? arcApplicationObjectId = default(System.Guid?), Azure.ResourceManager.Hci.Models.ArcSettingAggregateState? aggregateState = default(Azure.ResourceManager.Hci.Models.ArcSettingAggregateState?), System.Collections.Generic.IEnumerable perNodeDetails = null, System.BinaryData connectivityProperties = null) { throw null; } + public static Azure.ResourceManager.Hci.Models.ExtensionInstanceViewStatus ExtensionInstanceViewStatus(string code = null, Azure.ResourceManager.Hci.Models.HciStatusLevelType? level = default(Azure.ResourceManager.Hci.Models.HciStatusLevelType?), string displayStatus = null, string message = null, System.DateTimeOffset? time = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.Hci.HciClusterData HciClusterData(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.Hci.Models.HciProvisioningState? provisioningState = default(Azure.ResourceManager.Hci.Models.HciProvisioningState?), Azure.ResourceManager.Hci.Models.HciClusterStatus? status = default(Azure.ResourceManager.Hci.Models.HciClusterStatus?), System.Guid? cloudId = default(System.Guid?), string cloudManagementEndpoint = null, System.Guid? aadClientId = default(System.Guid?), System.Guid? aadTenantId = default(System.Guid?), System.Guid? aadApplicationObjectId = default(System.Guid?), System.Guid? aadServicePrincipalObjectId = default(System.Guid?), Azure.ResourceManager.Hci.Models.SoftwareAssuranceProperties softwareAssuranceProperties = null, Azure.ResourceManager.Hci.Models.HciClusterDesiredProperties desiredProperties = null, Azure.ResourceManager.Hci.Models.HciClusterReportedProperties reportedProperties = null, float? trialDaysRemaining = default(float?), string billingModel = null, System.DateTimeOffset? registrationTimestamp = default(System.DateTimeOffset?), System.DateTimeOffset? lastSyncTimestamp = default(System.DateTimeOffset?), System.DateTimeOffset? lastBillingTimestamp = default(System.DateTimeOffset?), string serviceEndpoint = null, string resourceProviderObjectId = null, System.Guid? principalId = default(System.Guid?), System.Guid? tenantId = default(System.Guid?), Azure.ResourceManager.Hci.Models.HciManagedServiceIdentityType? typeIdentityType = default(Azure.ResourceManager.Hci.Models.HciManagedServiceIdentityType?), System.Collections.Generic.IDictionary userAssignedIdentities = null) { throw null; } + public static Azure.ResourceManager.Hci.Models.HciClusterIdentityResult HciClusterIdentityResult(System.Guid? aadClientId = default(System.Guid?), System.Guid? aadTenantId = default(System.Guid?), System.Guid? aadServicePrincipalObjectId = default(System.Guid?), System.Guid? aadApplicationObjectId = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.Hci.Models.HciClusterNode HciClusterNode(string name = null, float? id = default(float?), Azure.ResourceManager.Hci.Models.WindowsServerSubscription? windowsServerSubscription = default(Azure.ResourceManager.Hci.Models.WindowsServerSubscription?), Azure.ResourceManager.Hci.Models.ClusterNodeType? nodeType = default(Azure.ResourceManager.Hci.Models.ClusterNodeType?), string ehcResourceId = null, string manufacturer = null, string model = null, string osName = null, string osVersion = null, string osDisplayVersion = null, string serialNumber = null, float? coreCount = default(float?), float? memoryInGiB = default(float?), System.DateTimeOffset? lastLicensingTimestamp = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.Hci.Models.HciClusterReportedProperties HciClusterReportedProperties(string clusterName = null, System.Guid? clusterId = default(System.Guid?), string clusterVersion = null, System.Collections.Generic.IEnumerable nodes = null, System.DateTimeOffset? lastUpdatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.Hci.Models.ImdsAttestationState? imdsAttestation = default(Azure.ResourceManager.Hci.Models.ImdsAttestationState?), Azure.ResourceManager.Hci.Models.HciClusterDiagnosticLevel? diagnosticLevel = default(Azure.ResourceManager.Hci.Models.HciClusterDiagnosticLevel?), System.Collections.Generic.IEnumerable supportedCapabilities = null) { throw null; } + public static Azure.ResourceManager.Hci.Models.HciExtensionInstanceView HciExtensionInstanceView(string name = null, string extensionInstanceViewType = null, string typeHandlerVersion = null, Azure.ResourceManager.Hci.Models.ExtensionInstanceViewStatus status = null) { throw null; } + public static Azure.ResourceManager.Hci.HciSkuData HciSkuData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string provisioningState = null, string publisherId = null, string offerId = null, string content = null, string contentVersion = null, System.Collections.Generic.IEnumerable skuMappings = null) { throw null; } + public static Azure.ResourceManager.Hci.OfferData OfferData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string provisioningState = null, string publisherId = null, string content = null, string contentVersion = null, System.Collections.Generic.IEnumerable skuMappings = null) { throw null; } + public static Azure.ResourceManager.Hci.Models.PerNodeArcState PerNodeArcState(string name = null, string arcInstance = null, Azure.ResourceManager.Hci.Models.NodeArcState? state = default(Azure.ResourceManager.Hci.Models.NodeArcState?)) { throw null; } + public static Azure.ResourceManager.Hci.Models.PerNodeExtensionState PerNodeExtensionState(string name = null, string extension = null, string typeHandlerVersion = null, Azure.ResourceManager.Hci.Models.NodeExtensionState? state = default(Azure.ResourceManager.Hci.Models.NodeExtensionState?), Azure.ResourceManager.Hci.Models.HciExtensionInstanceView instanceView = null) { throw null; } + public static Azure.ResourceManager.Hci.PublisherData PublisherData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string provisioningState = null) { throw null; } + public static Azure.ResourceManager.Hci.Models.SoftwareAssuranceProperties SoftwareAssuranceProperties(Azure.ResourceManager.Hci.Models.SoftwareAssuranceStatus? softwareAssuranceStatus = default(Azure.ResourceManager.Hci.Models.SoftwareAssuranceStatus?), Azure.ResourceManager.Hci.Models.SoftwareAssuranceIntent? softwareAssuranceIntent = default(Azure.ResourceManager.Hci.Models.SoftwareAssuranceIntent?), System.DateTimeOffset? lastUpdated = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.Hci.UpdateData UpdateData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.Hci.Models.HciProvisioningState? provisioningState = default(Azure.ResourceManager.Hci.Models.HciProvisioningState?), System.DateTimeOffset? installedOn = default(System.DateTimeOffset?), string description = null, Azure.ResourceManager.Hci.Models.HciUpdateState? state = default(Azure.ResourceManager.Hci.Models.HciUpdateState?), System.Collections.Generic.IEnumerable prerequisites = null, System.Collections.Generic.IEnumerable componentVersions = null, Azure.ResourceManager.Hci.Models.HciNodeRebootRequirement? rebootRequired = default(Azure.ResourceManager.Hci.Models.HciNodeRebootRequirement?), Azure.ResourceManager.Hci.Models.HciHealthState? healthState = default(Azure.ResourceManager.Hci.Models.HciHealthState?), System.Collections.Generic.IEnumerable healthCheckResult = null, System.DateTimeOffset? healthCheckOn = default(System.DateTimeOffset?), string packagePath = null, float? packageSizeInMb = default(float?), string displayName = null, string version = null, string publisher = null, string releaseLink = null, Azure.ResourceManager.Hci.Models.HciAvailabilityType? availabilityType = default(Azure.ResourceManager.Hci.Models.HciAvailabilityType?), string packageType = null, string additionalProperties = null, float? progressPercentage = default(float?), string notifyMessage = null) { throw null; } + public static Azure.ResourceManager.Hci.UpdateRunData UpdateRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.Hci.Models.HciProvisioningState? provisioningState = default(Azure.ResourceManager.Hci.Models.HciProvisioningState?), System.DateTimeOffset? timeStarted = default(System.DateTimeOffset?), System.DateTimeOffset? lastUpdatedOn = default(System.DateTimeOffset?), string duration = null, Azure.ResourceManager.Hci.Models.UpdateRunPropertiesState? state = default(Azure.ResourceManager.Hci.Models.UpdateRunPropertiesState?), string namePropertiesProgressName = null, string description = null, string errorMessage = null, string status = null, System.DateTimeOffset? startTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? endTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? lastUpdatedTimeUtc = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable steps = null) { throw null; } + public static Azure.ResourceManager.Hci.UpdateSummaryData UpdateSummaryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.Hci.Models.HciProvisioningState? provisioningState = default(Azure.ResourceManager.Hci.Models.HciProvisioningState?), string oemFamily = null, string hardwareModel = null, System.Collections.Generic.IEnumerable packageVersions = null, string currentVersion = null, System.DateTimeOffset? lastUpdated = default(System.DateTimeOffset?), System.DateTimeOffset? lastChecked = default(System.DateTimeOffset?), Azure.ResourceManager.Hci.Models.HciHealthState? healthState = default(Azure.ResourceManager.Hci.Models.HciHealthState?), System.Collections.Generic.IEnumerable healthCheckResult = null, System.DateTimeOffset? healthCheckOn = default(System.DateTimeOffset?), Azure.ResourceManager.Hci.Models.UpdateSummariesPropertiesState? state = default(Azure.ResourceManager.Hci.Models.UpdateSummariesPropertiesState?)) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ClusterNodeType : System.IEquatable { diff --git a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/ArmHciModelFactory.cs b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/ArmHciModelFactory.cs new file mode 100644 index 0000000000000..6e4cb4fc14579 --- /dev/null +++ b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/ArmHciModelFactory.cs @@ -0,0 +1,370 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.Hci; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Hci.Models +{ + /// Model factory for models. + public static partial class ArmHciModelFactory + { + /// Initializes a new instance of ArcSettingData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Provisioning state of the ArcSetting proxy resource. + /// The resource group that hosts the Arc agents, ie. Hybrid Compute Machine resources. + /// App id of arc AAD identity. + /// Tenant id of arc AAD identity. + /// Object id of arc AAD service principal. + /// Object id of arc AAD identity. + /// Aggregate state of Arc agent across the nodes in this HCI cluster. + /// State of Arc agent in each of the nodes. + /// contains connectivity related configuration for ARC resources. + /// A new instance for mocking. + public static ArcSettingData ArcSettingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, HciProvisioningState? provisioningState = null, string arcInstanceResourceGroup = null, Guid? arcApplicationClientId = null, Guid? arcApplicationTenantId = null, Guid? arcServicePrincipalObjectId = null, Guid? arcApplicationObjectId = null, ArcSettingAggregateState? aggregateState = null, IEnumerable perNodeDetails = null, BinaryData connectivityProperties = null) + { + perNodeDetails ??= new List(); + + return new ArcSettingData(id, name, resourceType, systemData, provisioningState, arcInstanceResourceGroup, arcApplicationClientId, arcApplicationTenantId, arcServicePrincipalObjectId, arcApplicationObjectId, aggregateState, perNodeDetails?.ToList(), connectivityProperties); + } + + /// Initializes a new instance of PerNodeArcState. + /// Name of the Node in HCI Cluster. + /// Fully qualified resource ID for the Arc agent of this node. + /// State of Arc agent in this node. + /// A new instance for mocking. + public static PerNodeArcState PerNodeArcState(string name = null, string arcInstance = null, NodeArcState? state = null) + { + return new PerNodeArcState(name, arcInstance, state); + } + + /// Initializes a new instance of ArcPasswordCredential. + /// + /// + /// + /// + /// A new instance for mocking. + public static ArcPasswordCredential ArcPasswordCredential(string secretText = null, string keyId = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null) + { + return new ArcPasswordCredential(secretText, keyId, startOn, endOn); + } + + /// Initializes a new instance of ArcIdentityResult. + /// + /// + /// + /// + /// A new instance for mocking. + public static ArcIdentityResult ArcIdentityResult(Guid? arcApplicationClientId = null, Guid? arcApplicationTenantId = null, Guid? arcServicePrincipalObjectId = null, Guid? arcApplicationObjectId = null) + { + return new ArcIdentityResult(arcApplicationClientId, arcApplicationTenantId, arcServicePrincipalObjectId, arcApplicationObjectId); + } + + /// Initializes a new instance of HciClusterData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Provisioning state. + /// Status of the cluster agent. + /// Unique, immutable resource id. + /// Endpoint configured for management from the Azure portal. + /// App id of cluster AAD identity. + /// Tenant id of cluster AAD identity. + /// Object id of cluster AAD identity. + /// Id of cluster identity service principal. + /// Software Assurance properties of the cluster. + /// Desired properties of the cluster. + /// Properties reported by cluster agent. + /// Number of days remaining in the trial period. + /// Type of billing applied to the resource. + /// First cluster sync timestamp. + /// Most recent cluster sync timestamp. + /// Most recent billing meter timestamp. + /// Region specific DataPath Endpoint of the cluster. + /// Object id of RP Service Principal. + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. + /// A new instance for mocking. + public static HciClusterData HciClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, HciProvisioningState? provisioningState = null, HciClusterStatus? status = null, Guid? cloudId = null, string cloudManagementEndpoint = null, Guid? aadClientId = null, Guid? aadTenantId = null, Guid? aadApplicationObjectId = null, Guid? aadServicePrincipalObjectId = null, SoftwareAssuranceProperties softwareAssuranceProperties = null, HciClusterDesiredProperties desiredProperties = null, HciClusterReportedProperties reportedProperties = null, float? trialDaysRemaining = null, string billingModel = null, DateTimeOffset? registrationTimestamp = null, DateTimeOffset? lastSyncTimestamp = null, DateTimeOffset? lastBillingTimestamp = null, string serviceEndpoint = null, string resourceProviderObjectId = null, Guid? principalId = null, Guid? tenantId = null, HciManagedServiceIdentityType? typeIdentityType = null, IDictionary userAssignedIdentities = null) + { + tags ??= new Dictionary(); + userAssignedIdentities ??= new Dictionary(); + + return new HciClusterData(id, name, resourceType, systemData, tags, location, provisioningState, status, cloudId, cloudManagementEndpoint, aadClientId, aadTenantId, aadApplicationObjectId, aadServicePrincipalObjectId, softwareAssuranceProperties, desiredProperties, reportedProperties, trialDaysRemaining, billingModel, registrationTimestamp, lastSyncTimestamp, lastBillingTimestamp, serviceEndpoint, resourceProviderObjectId, principalId, tenantId, typeIdentityType, userAssignedIdentities); + } + + /// Initializes a new instance of SoftwareAssuranceProperties. + /// Status of the Software Assurance for the cluster. + /// Customer Intent for Software Assurance Benefit. + /// TimeStamp denoting the latest SA benefit applicability is validated. + /// A new instance for mocking. + public static SoftwareAssuranceProperties SoftwareAssuranceProperties(SoftwareAssuranceStatus? softwareAssuranceStatus = null, SoftwareAssuranceIntent? softwareAssuranceIntent = null, DateTimeOffset? lastUpdated = null) + { + return new SoftwareAssuranceProperties(softwareAssuranceStatus, softwareAssuranceIntent, lastUpdated); + } + + /// Initializes a new instance of HciClusterReportedProperties. + /// Name of the on-prem cluster connected to this resource. + /// Unique id generated by the on-prem cluster. + /// Version of the cluster software. + /// List of nodes reported by the cluster. + /// Last time the cluster reported the data. + /// IMDS attestation status of the cluster. + /// Level of diagnostic data emitted by the cluster. + /// Capabilities supported by the cluster. + /// A new instance for mocking. + public static HciClusterReportedProperties HciClusterReportedProperties(string clusterName = null, Guid? clusterId = null, string clusterVersion = null, IEnumerable nodes = null, DateTimeOffset? lastUpdatedOn = null, ImdsAttestationState? imdsAttestation = null, HciClusterDiagnosticLevel? diagnosticLevel = null, IEnumerable supportedCapabilities = null) + { + nodes ??= new List(); + supportedCapabilities ??= new List(); + + return new HciClusterReportedProperties(clusterName, clusterId, clusterVersion, nodes?.ToList(), lastUpdatedOn, imdsAttestation, diagnosticLevel, supportedCapabilities?.ToList()); + } + + /// Initializes a new instance of HciClusterNode. + /// Name of the cluster node. + /// Id of the node in the cluster. + /// State of Windows Server Subscription. + /// Type of the cluster node hardware. + /// Edge Hardware Center Resource Id. + /// Manufacturer of the cluster node hardware. + /// Model name of the cluster node hardware. + /// Operating system running on the cluster node. + /// Version of the operating system running on the cluster node. + /// Display version of the operating system running on the cluster node. + /// Immutable id of the cluster node. + /// Number of physical cores on the cluster node. + /// Total available memory on the cluster node (in GiB). + /// Most recent licensing timestamp. + /// A new instance for mocking. + public static HciClusterNode HciClusterNode(string name = null, float? id = null, WindowsServerSubscription? windowsServerSubscription = null, ClusterNodeType? nodeType = null, string ehcResourceId = null, string manufacturer = null, string model = null, string osName = null, string osVersion = null, string osDisplayVersion = null, string serialNumber = null, float? coreCount = null, float? memoryInGiB = null, DateTimeOffset? lastLicensingTimestamp = null) + { + return new HciClusterNode(name, id, windowsServerSubscription, nodeType, ehcResourceId, manufacturer, model, osName, osVersion, osDisplayVersion, serialNumber, coreCount, memoryInGiB, lastLicensingTimestamp); + } + + /// Initializes a new instance of HciClusterIdentityResult. + /// + /// + /// + /// + /// A new instance for mocking. + public static HciClusterIdentityResult HciClusterIdentityResult(Guid? aadClientId = null, Guid? aadTenantId = null, Guid? aadServicePrincipalObjectId = null, Guid? aadApplicationObjectId = null) + { + return new HciClusterIdentityResult(aadClientId, aadTenantId, aadServicePrincipalObjectId, aadApplicationObjectId); + } + + /// Initializes a new instance of ArcExtensionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Provisioning state of the Extension proxy resource. + /// Aggregate state of Arc Extensions across the nodes in this HCI cluster. + /// State of Arc Extension in each of the nodes. + /// How the extension handler should be forced to update even if the extension configuration has not changed. + /// The name of the extension handler publisher. + /// Specifies the type of the extension; an example is "CustomScriptExtension". + /// Specifies the version of the script handler. Latest version would be used if not specified. + /// Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + /// Json formatted public settings for the extension. + /// Protected settings (may contain secrets). + /// Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. + /// A new instance for mocking. + public static ArcExtensionData ArcExtensionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, HciProvisioningState? provisioningState = null, ArcExtensionAggregateState? aggregateState = null, IEnumerable perNodeExtensionDetails = null, string forceUpdateTag = null, string publisher = null, string arcExtensionType = null, string typeHandlerVersion = null, bool? shouldAutoUpgradeMinorVersion = null, BinaryData settings = null, BinaryData protectedSettings = null, bool? enableAutomaticUpgrade = null) + { + perNodeExtensionDetails ??= new List(); + + return new ArcExtensionData(id, name, resourceType, systemData, provisioningState, aggregateState, perNodeExtensionDetails?.ToList(), forceUpdateTag, publisher, arcExtensionType, typeHandlerVersion, shouldAutoUpgradeMinorVersion, settings, protectedSettings, enableAutomaticUpgrade); + } + + /// Initializes a new instance of PerNodeExtensionState. + /// Name of the node in HCI Cluster. + /// Fully qualified resource ID for the particular Arc Extension on this node. + /// Specifies the version of the script handler. + /// State of Arc Extension in this node. + /// The extension instance view. + /// A new instance for mocking. + public static PerNodeExtensionState PerNodeExtensionState(string name = null, string extension = null, string typeHandlerVersion = null, NodeExtensionState? state = null, HciExtensionInstanceView instanceView = null) + { + return new PerNodeExtensionState(name, extension, typeHandlerVersion, state, instanceView); + } + + /// Initializes a new instance of HciExtensionInstanceView. + /// The extension name. + /// Specifies the type of the extension; an example is "MicrosoftMonitoringAgent". + /// Specifies the version of the script handler. + /// Instance view status. + /// A new instance for mocking. + public static HciExtensionInstanceView HciExtensionInstanceView(string name = null, string extensionInstanceViewType = null, string typeHandlerVersion = null, ExtensionInstanceViewStatus status = null) + { + return new HciExtensionInstanceView(name, extensionInstanceViewType, typeHandlerVersion, status); + } + + /// Initializes a new instance of ExtensionInstanceViewStatus. + /// The status code. + /// The level code. + /// The short localizable label for the status. + /// The detailed status message, including for alerts and error messages. + /// The time of the status. + /// A new instance for mocking. + public static ExtensionInstanceViewStatus ExtensionInstanceViewStatus(string code = null, HciStatusLevelType? level = null, string displayStatus = null, string message = null, DateTimeOffset? time = null) + { + return new ExtensionInstanceViewStatus(code, level, displayStatus, message, time); + } + + /// Initializes a new instance of OfferData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Provisioning State. + /// Identifier of the Publisher for the offer. + /// JSON serialized catalog content of the offer. + /// The API version of the catalog service used to serve the catalog content. + /// Array of SKU mappings. + /// A new instance for mocking. + public static OfferData OfferData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string provisioningState = null, string publisherId = null, string content = null, string contentVersion = null, IEnumerable skuMappings = null) + { + skuMappings ??= new List(); + + return new OfferData(id, name, resourceType, systemData, provisioningState, publisherId, content, contentVersion, skuMappings?.ToList()); + } + + /// Initializes a new instance of PublisherData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Provisioning State. + /// A new instance for mocking. + public static PublisherData PublisherData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string provisioningState = null) + { + return new PublisherData(id, name, resourceType, systemData, provisioningState); + } + + /// Initializes a new instance of HciSkuData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Provisioning State. + /// Identifier of the Publisher for the offer. + /// Identifier of the Offer for the sku. + /// JSON serialized catalog content of the sku offer. + /// The API version of the catalog service used to serve the catalog content. + /// Array of SKU mappings. + /// A new instance for mocking. + public static HciSkuData HciSkuData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string provisioningState = null, string publisherId = null, string offerId = null, string content = null, string contentVersion = null, IEnumerable skuMappings = null) + { + skuMappings ??= new List(); + + return new HciSkuData(id, name, resourceType, systemData, provisioningState, publisherId, offerId, content, contentVersion, skuMappings?.ToList()); + } + + /// Initializes a new instance of UpdateRunData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The geo-location where the resource lives. + /// Provisioning state of the UpdateRuns proxy resource. + /// Timestamp of the update run was started. + /// Timestamp of the most recently completed step in the update run. + /// Duration of the update run. + /// State of the update run. + /// Name of the step. + /// More detailed description of the step. + /// Error message, specified if the step is in a failed state. + /// Status of the step, bubbled up from the ECE action plan for installation attempts. Values are: 'Success', 'Error', 'InProgress', and 'Unknown status'. + /// When the step started, or empty if it has not started executing. + /// When the step reached a terminal state. + /// Completion time of this step or the last completed sub-step. + /// Recursive model for child steps of this step. + /// A new instance for mocking. + public static UpdateRunData UpdateRunData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, HciProvisioningState? provisioningState = null, DateTimeOffset? timeStarted = null, DateTimeOffset? lastUpdatedOn = null, string duration = null, UpdateRunPropertiesState? state = null, string namePropertiesProgressName = null, string description = null, string errorMessage = null, string status = null, DateTimeOffset? startTimeUtc = null, DateTimeOffset? endTimeUtc = null, DateTimeOffset? lastUpdatedTimeUtc = null, IEnumerable steps = null) + { + steps ??= new List(); + + return new UpdateRunData(id, name, resourceType, systemData, location, provisioningState, timeStarted, lastUpdatedOn, duration, state, namePropertiesProgressName, description, errorMessage, status, startTimeUtc, endTimeUtc, lastUpdatedTimeUtc, steps?.ToList()); + } + + /// Initializes a new instance of UpdateSummaryData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The geo-location where the resource lives. + /// Provisioning state of the UpdateSummaries proxy resource. + /// OEM family name. + /// Name of the hardware model. + /// Current version of each updatable component. + /// Current Solution Bundle version of the stamp. + /// Last time an update installation completed successfully. + /// Last time the update service successfully checked for updates. + /// Overall health state for update-specific health checks. + /// An array of pre-check result objects. + /// Last time the package-specific checks were run. + /// Overall update state of the stamp. + /// A new instance for mocking. + public static UpdateSummaryData UpdateSummaryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, HciProvisioningState? provisioningState = null, string oemFamily = null, string hardwareModel = null, IEnumerable packageVersions = null, string currentVersion = null, DateTimeOffset? lastUpdated = null, DateTimeOffset? lastChecked = null, HciHealthState? healthState = null, IEnumerable healthCheckResult = null, DateTimeOffset? healthCheckOn = null, UpdateSummariesPropertiesState? state = null) + { + packageVersions ??= new List(); + healthCheckResult ??= new List(); + + return new UpdateSummaryData(id, name, resourceType, systemData, location, provisioningState, oemFamily, hardwareModel, packageVersions?.ToList(), currentVersion, lastUpdated, lastChecked, healthState, healthCheckResult?.ToList(), healthCheckOn, state); + } + + /// Initializes a new instance of UpdateData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The geo-location where the resource lives. + /// Provisioning state of the Updates proxy resource. + /// Date that the update was installed. + /// Description of the update. + /// State of the update as it relates to this stamp. + /// If update State is HasPrerequisite, this property contains an array of objects describing prerequisite updates before installing this update. Otherwise, it is empty. + /// An array of component versions for a Solution Bundle update, and an empty array otherwise. + /// + /// Overall health state for update-specific health checks. + /// An array of PrecheckResult objects. + /// Last time the package-specific checks were run. + /// Path where the update package is available. + /// Size of the package. This value is a combination of the size from update metadata and size of the payload that results from the live scan operation for OS update content. + /// Display name of the Update. + /// Version of the update. + /// Publisher of the update package. + /// Link to release notes for the update. + /// Indicates the way the update content can be downloaded. + /// Customer-visible type of the update. + /// Extensible KV pairs serialized as a string. This is currently used to report the stamp OEM family and hardware model information when an update is flagged as Invalid for the stamp based on OEM type. + /// Progress percentage of ongoing operation. Currently this property is only valid when the update is in the Downloading state, where it maps to how much of the update content has been downloaded. + /// Brief message with instructions for updates of AvailabilityType Notify. + /// A new instance for mocking. + public static UpdateData UpdateData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, HciProvisioningState? provisioningState = null, DateTimeOffset? installedOn = null, string description = null, HciUpdateState? state = null, IEnumerable prerequisites = null, IEnumerable componentVersions = null, HciNodeRebootRequirement? rebootRequired = null, HciHealthState? healthState = null, IEnumerable healthCheckResult = null, DateTimeOffset? healthCheckOn = null, string packagePath = null, float? packageSizeInMb = null, string displayName = null, string version = null, string publisher = null, string releaseLink = null, HciAvailabilityType? availabilityType = null, string packageType = null, string additionalProperties = null, float? progressPercentage = null, string notifyMessage = null) + { + prerequisites ??= new List(); + componentVersions ??= new List(); + healthCheckResult ??= new List(); + + return new UpdateData(id, name, resourceType, systemData, location, provisioningState, installedOn, description, state, prerequisites?.ToList(), componentVersions?.ToList(), rebootRequired, healthState, healthCheckResult?.ToList(), healthCheckOn, packagePath, packageSizeInMb, displayName, version, publisher, releaseLink, availabilityType, packageType, additionalProperties, progressPercentage, notifyMessage); + } + } +} diff --git a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/autorest.md b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/autorest.md index c044ebf18fc0f..a37dcaea658b4 100644 --- a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/autorest.md +++ b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/autorest.md @@ -5,7 +5,6 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true -generate-model-factory: false csharp: true library-name: Hci namespace: Azure.ResourceManager.Hci