From d21105cc34af0107e7097519c588090f5ff15023 Mon Sep 17 00:00:00 2001 From: Chengming <61542202+dvbb@users.noreply.github.com> Date: Mon, 29 May 2023 17:43:49 +0800 Subject: [PATCH] enable model factory (#36561) --- .../CHANGELOG.md | 9 +- ...sourceManager.FluidRelay.netstandard2.0.cs | 7 + .../Generated/ArmFluidRelayModelFactory.cs | 80 +++ .../src/autorest.md | 1 - .../CHANGELOG.md | 9 +- ...esourceManager.FrontDoor.netstandard2.0.cs | 24 + .../src/Generated/ArmFrontDoorModelFactory.cs | 410 +++++++++++++ .../src/autorest.md | 1 - .../CHANGELOG.md | 9 +- ....ResourceManager.Grafana.netstandard2.0.cs | 7 + .../src/Generated/ArmGrafanaModelFactory.cs | 95 ++++ .../src/autorest.md | 1 - .../CHANGELOG.md | 9 +- ...nager.GuestConfiguration.netstandard2.0.cs | 18 + .../ArmGuestConfigurationModelFactory.cs | 219 +++++++ .../src/autorest.md | 1 - .../CHANGELOG.md | 9 +- ...esourceManager.HDInsight.netstandard2.0.cs | 39 ++ .../src/Generated/ArmHDInsightModelFactory.cs | 537 ++++++++++++++++++ .../src/autorest.md | 1 - 20 files changed, 1461 insertions(+), 25 deletions(-) create mode 100644 sdk/fluidrelay/Azure.ResourceManager.FluidRelay/src/Generated/ArmFluidRelayModelFactory.cs create mode 100644 sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/ArmFrontDoorModelFactory.cs create mode 100644 sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ArmGrafanaModelFactory.cs create mode 100644 sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/ArmGuestConfigurationModelFactory.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/ArmHDInsightModelFactory.cs diff --git a/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/CHANGELOG.md b/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/CHANGELOG.md index f44c1f693a118..327f444c69af7 100644 --- a/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/CHANGELOG.md +++ b/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/CHANGELOG.md @@ -1,15 +1,16 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2023-05-30) ### Features Added -### Breaking Changes - -### Bugs Fixed +- 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). ### Other Changes +- Upgraded dependent Azure.Core to 1.32.0. +- Upgraded dependent Azure.ResourceManager to 1.6.0. + ## 1.0.1 (2023-02-16) ### Other Changes diff --git a/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/api/Azure.ResourceManager.FluidRelay.netstandard2.0.cs b/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/api/Azure.ResourceManager.FluidRelay.netstandard2.0.cs index f35336df97b95..ff0c44272c199 100644 --- a/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/api/Azure.ResourceManager.FluidRelay.netstandard2.0.cs +++ b/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/api/Azure.ResourceManager.FluidRelay.netstandard2.0.cs @@ -99,6 +99,13 @@ protected FluidRelayServerResource() { } } namespace Azure.ResourceManager.FluidRelay.Models { + public static partial class ArmFluidRelayModelFactory + { + public static Azure.ResourceManager.FluidRelay.FluidRelayContainerData FluidRelayContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? frsTenantId = default(System.Guid?), System.Guid? frsContainerId = default(System.Guid?), Azure.ResourceManager.FluidRelay.Models.FluidRelayProvisioningState? provisioningState = default(Azure.ResourceManager.FluidRelay.Models.FluidRelayProvisioningState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastAccessOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.FluidRelay.Models.FluidRelayEndpoints FluidRelayEndpoints(System.Collections.Generic.IEnumerable ordererEndpoints = null, System.Collections.Generic.IEnumerable storageEndpoints = null, System.Collections.Generic.IEnumerable serviceEndpoints = null) { throw null; } + public static Azure.ResourceManager.FluidRelay.FluidRelayServerData FluidRelayServerData(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.Models.ManagedServiceIdentity identity = null, System.Guid? frsTenantId = default(System.Guid?), Azure.ResourceManager.FluidRelay.Models.FluidRelayEndpoints fluidRelayEndpoints = null, Azure.ResourceManager.FluidRelay.Models.FluidRelayProvisioningState? provisioningState = default(Azure.ResourceManager.FluidRelay.Models.FluidRelayProvisioningState?), Azure.ResourceManager.FluidRelay.Models.CmkEncryptionProperties customerManagedKeyEncryption = null, Azure.ResourceManager.FluidRelay.Models.FluidRelayStorageSku? storageSku = default(Azure.ResourceManager.FluidRelay.Models.FluidRelayStorageSku?)) { throw null; } + public static Azure.ResourceManager.FluidRelay.Models.FluidRelayServerKeys FluidRelayServerKeys(string primaryKey = null, string secondaryKey = null) { throw null; } + } public partial class CmkEncryptionProperties { public CmkEncryptionProperties() { } diff --git a/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/src/Generated/ArmFluidRelayModelFactory.cs b/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/src/Generated/ArmFluidRelayModelFactory.cs new file mode 100644 index 0000000000000..cf44aae3df251 --- /dev/null +++ b/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/src/Generated/ArmFluidRelayModelFactory.cs @@ -0,0 +1,80 @@ +// 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.FluidRelay; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.FluidRelay.Models +{ + /// Model factory for models. + public static partial class ArmFluidRelayModelFactory + { + /// Initializes a new instance of FluidRelayServerData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The type of identity used for the resource. + /// The Fluid tenantId for this server. + /// The Fluid Relay Service endpoints for this server. + /// Provision states for FluidRelay RP. + /// All encryption configuration for a resource. + /// Sku of the storage associated with the resource. + /// A new instance for mocking. + public static FluidRelayServerData FluidRelayServerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, Guid? frsTenantId = null, FluidRelayEndpoints fluidRelayEndpoints = null, FluidRelayProvisioningState? provisioningState = null, CmkEncryptionProperties customerManagedKeyEncryption = null, FluidRelayStorageSku? storageSku = null) + { + tags ??= new Dictionary(); + + return new FluidRelayServerData(id, name, resourceType, systemData, tags, location, identity, frsTenantId, fluidRelayEndpoints, provisioningState, customerManagedKeyEncryption != null ? new EncryptionProperties(customerManagedKeyEncryption) : null, storageSku); + } + + /// Initializes a new instance of FluidRelayEndpoints. + /// The Fluid Relay Orderer endpoints. + /// The Fluid Relay storage endpoints. + /// The Fluid Relay service endpoints. + /// A new instance for mocking. + public static FluidRelayEndpoints FluidRelayEndpoints(IEnumerable ordererEndpoints = null, IEnumerable storageEndpoints = null, IEnumerable serviceEndpoints = null) + { + ordererEndpoints ??= new List(); + storageEndpoints ??= new List(); + serviceEndpoints ??= new List(); + + return new FluidRelayEndpoints(ordererEndpoints?.ToList(), storageEndpoints?.ToList(), serviceEndpoints?.ToList()); + } + + /// Initializes a new instance of FluidRelayServerKeys. + /// The primary key for this server. + /// The secondary key for this server. + /// A new instance for mocking. + public static FluidRelayServerKeys FluidRelayServerKeys(string primaryKey = null, string secondaryKey = null) + { + return new FluidRelayServerKeys(primaryKey, secondaryKey); + } + + /// Initializes a new instance of FluidRelayContainerData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The Fluid tenantId for this container. + /// The frsContainerId for this container. + /// Provision states for FluidRelay RP. + /// The creation time of this resource. + /// Last time when user access this resource. + /// A new instance for mocking. + public static FluidRelayContainerData FluidRelayContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? frsTenantId = null, Guid? frsContainerId = null, FluidRelayProvisioningState? provisioningState = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastAccessOn = null) + { + return new FluidRelayContainerData(id, name, resourceType, systemData, frsTenantId, frsContainerId, provisioningState, createdOn, lastAccessOn); + } + } +} diff --git a/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/src/autorest.md b/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/src/autorest.md index 916a65454db34..ae32a9b8938df 100644 --- a/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/src/autorest.md +++ b/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/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: FluidRelay namespace: Azure.ResourceManager.FluidRelay diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/CHANGELOG.md b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/CHANGELOG.md index d5e9e82e44bcf..e8afd7b782157 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/CHANGELOG.md +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/CHANGELOG.md @@ -1,15 +1,16 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0-beta.1 (2023-05-30) ### Features Added -### Breaking Changes - -### Bugs Fixed +- 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). ### Other Changes +- Upgraded dependent Azure.Core to 1.32.0. +- Upgraded dependent Azure.ResourceManager to 1.6.0. + ## 1.1.0 (2023-02-16) ### Features Added diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/api/Azure.ResourceManager.FrontDoor.netstandard2.0.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/api/Azure.ResourceManager.FrontDoor.netstandard2.0.cs index 6f9608eae726a..cda77ccc004cd 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/api/Azure.ResourceManager.FrontDoor.netstandard2.0.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/api/Azure.ResourceManager.FrontDoor.netstandard2.0.cs @@ -316,6 +316,30 @@ protected FrontendEndpointResource() { } } namespace Azure.ResourceManager.FrontDoor.Models { + public static partial class ArmFrontDoorModelFactory + { + public static Azure.ResourceManager.FrontDoor.Models.FrontDoorBackend FrontDoorBackend(string address = null, string privateLinkAlias = null, Azure.Core.ResourceIdentifier privateLinkResourceId = null, Azure.Core.AzureLocation? privateLinkLocation = default(Azure.Core.AzureLocation?), Azure.ResourceManager.FrontDoor.Models.BackendPrivateEndpointStatus? privateEndpointStatus = default(Azure.ResourceManager.FrontDoor.Models.BackendPrivateEndpointStatus?), string privateLinkApprovalMessage = null, int? httpPort = default(int?), int? httpsPort = default(int?), Azure.ResourceManager.FrontDoor.Models.BackendEnabledState? enabledState = default(Azure.ResourceManager.FrontDoor.Models.BackendEnabledState?), int? priority = default(int?), int? weight = default(int?), string backendHostHeader = null) { throw null; } + public static Azure.ResourceManager.FrontDoor.Models.FrontDoorBackendPool FrontDoorBackendPool(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), System.Collections.Generic.IEnumerable backends = null, Azure.Core.ResourceIdentifier loadBalancingSettingsId = null, Azure.Core.ResourceIdentifier healthProbeSettingsId = null, Azure.ResourceManager.FrontDoor.Models.FrontDoorResourceState? resourceState = default(Azure.ResourceManager.FrontDoor.Models.FrontDoorResourceState?)) { throw null; } + public static Azure.ResourceManager.FrontDoor.FrontDoorData FrontDoorData(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), string friendlyName = null, System.Collections.Generic.IEnumerable routingRules = null, System.Collections.Generic.IEnumerable loadBalancingSettings = null, System.Collections.Generic.IEnumerable healthProbeSettings = null, System.Collections.Generic.IEnumerable backendPools = null, System.Collections.Generic.IEnumerable frontendEndpoints = null, Azure.ResourceManager.FrontDoor.Models.BackendPoolsSettings backendPoolsSettings = null, Azure.ResourceManager.FrontDoor.Models.FrontDoorEnabledState? enabledState = default(Azure.ResourceManager.FrontDoor.Models.FrontDoorEnabledState?), Azure.ResourceManager.FrontDoor.Models.FrontDoorResourceState? resourceState = default(Azure.ResourceManager.FrontDoor.Models.FrontDoorResourceState?), string provisioningState = null, string cname = null, string frontdoorId = null, System.Collections.Generic.IEnumerable rulesEngines = null, System.Collections.Generic.IReadOnlyDictionary extendedProperties = null) { throw null; } + public static Azure.ResourceManager.FrontDoor.FrontDoorExperimentData FrontDoorExperimentData(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), string description = null, Azure.ResourceManager.FrontDoor.Models.FrontDoorExperimentEndpointProperties experimentEndpointA = null, Azure.ResourceManager.FrontDoor.Models.FrontDoorExperimentEndpointProperties experimentEndpointB = null, Azure.ResourceManager.FrontDoor.Models.FrontDoorExperimentState? enabledState = default(Azure.ResourceManager.FrontDoor.Models.FrontDoorExperimentState?), Azure.ResourceManager.FrontDoor.Models.NetworkExperimentResourceState? resourceState = default(Azure.ResourceManager.FrontDoor.Models.NetworkExperimentResourceState?), string status = null, System.Uri scriptFileUri = null) { throw null; } + public static Azure.ResourceManager.FrontDoor.Models.FrontDoorHealthProbeSettingsData FrontDoorHealthProbeSettingsData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), string path = null, Azure.ResourceManager.FrontDoor.Models.FrontDoorProtocol? protocol = default(Azure.ResourceManager.FrontDoor.Models.FrontDoorProtocol?), int? intervalInSeconds = default(int?), Azure.ResourceManager.FrontDoor.Models.FrontDoorHealthProbeMethod? healthProbeMethod = default(Azure.ResourceManager.FrontDoor.Models.FrontDoorHealthProbeMethod?), Azure.ResourceManager.FrontDoor.Models.HealthProbeEnabled? enabledState = default(Azure.ResourceManager.FrontDoor.Models.HealthProbeEnabled?), Azure.ResourceManager.FrontDoor.Models.FrontDoorResourceState? resourceState = default(Azure.ResourceManager.FrontDoor.Models.FrontDoorResourceState?)) { throw null; } + public static Azure.ResourceManager.FrontDoor.Models.FrontDoorLoadBalancingSettingsData FrontDoorLoadBalancingSettingsData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), int? sampleSize = default(int?), int? successfulSamplesRequired = default(int?), int? additionalLatencyMilliseconds = default(int?), Azure.ResourceManager.FrontDoor.Models.FrontDoorResourceState? resourceState = default(Azure.ResourceManager.FrontDoor.Models.FrontDoorResourceState?)) { throw null; } + public static Azure.ResourceManager.FrontDoor.Models.FrontDoorNameAvailabilityResult FrontDoorNameAvailabilityResult(Azure.ResourceManager.FrontDoor.Models.FrontDoorNameAvailabilityState? nameAvailability = default(Azure.ResourceManager.FrontDoor.Models.FrontDoorNameAvailabilityState?), string reason = null, string message = null) { throw null; } + public static Azure.ResourceManager.FrontDoor.FrontDoorNetworkExperimentProfileData FrontDoorNetworkExperimentProfileData(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.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.FrontDoor.Models.NetworkExperimentResourceState? resourceState = default(Azure.ResourceManager.FrontDoor.Models.NetworkExperimentResourceState?), Azure.ResourceManager.FrontDoor.Models.FrontDoorExperimentState? enabledState = default(Azure.ResourceManager.FrontDoor.Models.FrontDoorExperimentState?)) { throw null; } + public static Azure.ResourceManager.FrontDoor.Models.FrontDoorResourceData FrontDoorResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?)) { throw null; } + public static Azure.ResourceManager.FrontDoor.FrontDoorRulesEngineData FrontDoorRulesEngineData(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.IEnumerable rules = null, Azure.ResourceManager.FrontDoor.Models.FrontDoorResourceState? resourceState = default(Azure.ResourceManager.FrontDoor.Models.FrontDoorResourceState?)) { throw null; } + public static Azure.ResourceManager.FrontDoor.Models.FrontDoorTimeSeriesInfo FrontDoorTimeSeriesInfo(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), System.Uri endpoint = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.FrontDoor.Models.FrontDoorTimeSeriesInfoAggregationInterval? aggregationInterval = default(Azure.ResourceManager.FrontDoor.Models.FrontDoorTimeSeriesInfoAggregationInterval?), Azure.ResourceManager.FrontDoor.Models.FrontDoorTimeSeriesType? timeSeriesType = default(Azure.ResourceManager.FrontDoor.Models.FrontDoorTimeSeriesType?), string country = null, System.Collections.Generic.IEnumerable timeSeriesData = null) { throw null; } + public static Azure.ResourceManager.FrontDoor.Models.FrontDoorValidateCustomDomainResult FrontDoorValidateCustomDomainResult(bool? isCustomDomainValidated = default(bool?), string reason = null, string message = null) { throw null; } + public static Azure.ResourceManager.FrontDoor.FrontDoorWebApplicationFirewallPolicyData FrontDoorWebApplicationFirewallPolicyData(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.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.FrontDoor.Models.FrontDoorSkuName? skuName = default(Azure.ResourceManager.FrontDoor.Models.FrontDoorSkuName?), Azure.ResourceManager.FrontDoor.Models.FrontDoorWebApplicationFirewallPolicySettings policySettings = null, System.Collections.Generic.IEnumerable rules = null, System.Collections.Generic.IEnumerable managedRuleSets = null, System.Collections.Generic.IEnumerable frontendEndpointLinks = null, System.Collections.Generic.IEnumerable routingRuleLinks = null, System.Collections.Generic.IEnumerable securityPolicyLinks = null, string provisioningState = null, Azure.ResourceManager.FrontDoor.Models.FrontDoorWebApplicationFirewallPolicyResourceState? resourceState = default(Azure.ResourceManager.FrontDoor.Models.FrontDoorWebApplicationFirewallPolicyResourceState?)) { throw null; } + public static Azure.ResourceManager.FrontDoor.FrontendEndpointData FrontendEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), string hostName = null, Azure.ResourceManager.FrontDoor.Models.SessionAffinityEnabledState? sessionAffinityEnabledState = default(Azure.ResourceManager.FrontDoor.Models.SessionAffinityEnabledState?), int? sessionAffinityTtlInSeconds = default(int?), Azure.Core.ResourceIdentifier webApplicationFirewallPolicyLinkId = null, Azure.ResourceManager.FrontDoor.Models.FrontDoorResourceState? resourceState = default(Azure.ResourceManager.FrontDoor.Models.FrontDoorResourceState?), Azure.ResourceManager.FrontDoor.Models.FrontendEndpointCustomHttpsProvisioningState? customHttpsProvisioningState = default(Azure.ResourceManager.FrontDoor.Models.FrontendEndpointCustomHttpsProvisioningState?), Azure.ResourceManager.FrontDoor.Models.FrontendEndpointCustomHttpsProvisioningSubstate? customHttpsProvisioningSubstate = default(Azure.ResourceManager.FrontDoor.Models.FrontendEndpointCustomHttpsProvisioningSubstate?), Azure.ResourceManager.FrontDoor.Models.CustomHttpsConfiguration customHttpsConfiguration = null) { throw null; } + public static Azure.ResourceManager.FrontDoor.Models.LatencyMetric LatencyMetric(string name = null, System.DateTimeOffset? endOn = default(System.DateTimeOffset?), float? aValue = default(float?), float? bValue = default(float?), float? delta = default(float?), float? deltaPercent = default(float?), float? acLower95CI = default(float?), float? ahUpper95CI = default(float?), float? bcLower95CI = default(float?), float? bUpper95CI = default(float?)) { throw null; } + public static Azure.ResourceManager.FrontDoor.Models.LatencyScorecard LatencyScorecard(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), string latencyScorecardId = null, string latencyScorecardName = null, string description = null, System.Uri scorecardEndpointA = null, System.Uri scorecardEndpointB = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string country = null, System.Collections.Generic.IEnumerable latencyMetrics = null) { throw null; } + public static Azure.ResourceManager.FrontDoor.Models.ManagedRuleDefinition ManagedRuleDefinition(string ruleId = null, Azure.ResourceManager.FrontDoor.Models.ManagedRuleEnabledState? defaultState = default(Azure.ResourceManager.FrontDoor.Models.ManagedRuleEnabledState?), Azure.ResourceManager.FrontDoor.Models.RuleMatchActionType? defaultAction = default(Azure.ResourceManager.FrontDoor.Models.RuleMatchActionType?), string description = null) { throw null; } + public static Azure.ResourceManager.FrontDoor.Models.ManagedRuleGroupDefinition ManagedRuleGroupDefinition(string ruleGroupName = null, string description = null, System.Collections.Generic.IEnumerable rules = null) { throw null; } + public static Azure.ResourceManager.FrontDoor.Models.ManagedRuleSetDefinition ManagedRuleSetDefinition(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), string provisioningState = null, string ruleSetId = null, string ruleSetType = null, string ruleSetVersion = null, System.Collections.Generic.IEnumerable ruleGroups = null) { throw null; } + public static Azure.ResourceManager.FrontDoor.Models.PreconfiguredEndpoint PreconfiguredEndpoint(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), string description = null, string endpoint = null, Azure.ResourceManager.FrontDoor.Models.FrontDoorEndpointType? endpointType = default(Azure.ResourceManager.FrontDoor.Models.FrontDoorEndpointType?), string backend = null) { throw null; } + public static Azure.ResourceManager.FrontDoor.Models.RoutingRuleData RoutingRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), System.Collections.Generic.IEnumerable frontendEndpoints = null, System.Collections.Generic.IEnumerable acceptedProtocols = null, System.Collections.Generic.IEnumerable patternsToMatch = null, Azure.ResourceManager.FrontDoor.Models.RoutingRuleEnabledState? enabledState = default(Azure.ResourceManager.FrontDoor.Models.RoutingRuleEnabledState?), Azure.ResourceManager.FrontDoor.Models.RouteConfiguration routeConfiguration = null, Azure.Core.ResourceIdentifier rulesEngineId = null, Azure.Core.ResourceIdentifier webApplicationFirewallPolicyLinkId = null, Azure.ResourceManager.FrontDoor.Models.FrontDoorResourceState? resourceState = default(Azure.ResourceManager.FrontDoor.Models.FrontDoorResourceState?)) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct BackendEnabledState : System.IEquatable { diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/ArmFrontDoorModelFactory.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/ArmFrontDoorModelFactory.cs new file mode 100644 index 0000000000000..3f7294f4f8e49 --- /dev/null +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/ArmFrontDoorModelFactory.cs @@ -0,0 +1,410 @@ +// 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; +using Azure.Core; +using Azure.ResourceManager.FrontDoor; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.FrontDoor.Models +{ + /// Model factory for models. + public static partial class ArmFrontDoorModelFactory + { + /// Initializes a new instance of FrontDoorWebApplicationFirewallPolicyData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Gets a unique read-only string that changes whenever the resource is updated. + /// The pricing tier of web application firewall policy. Defaults to Classic_AzureFrontDoor if not specified. + /// Describes settings for the policy. + /// Describes custom rules inside the policy. + /// Describes managed rules inside the policy. + /// Describes Frontend Endpoints associated with this Web Application Firewall policy. + /// Describes Routing Rules associated with this Web Application Firewall policy. + /// Describes Security Policy associated with this Web Application Firewall policy. + /// Provisioning state of the policy. + /// Resource status of the policy. + /// A new instance for mocking. + public static FrontDoorWebApplicationFirewallPolicyData FrontDoorWebApplicationFirewallPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, FrontDoorSkuName? skuName = null, FrontDoorWebApplicationFirewallPolicySettings policySettings = null, IEnumerable rules = null, IEnumerable managedRuleSets = null, IEnumerable frontendEndpointLinks = null, IEnumerable routingRuleLinks = null, IEnumerable securityPolicyLinks = null, string provisioningState = null, FrontDoorWebApplicationFirewallPolicyResourceState? resourceState = null) + { + tags ??= new Dictionary(); + rules ??= new List(); + managedRuleSets ??= new List(); + frontendEndpointLinks ??= new List(); + routingRuleLinks ??= new List(); + securityPolicyLinks ??= new List(); + + return new FrontDoorWebApplicationFirewallPolicyData(id, name, resourceType, systemData, tags, location, etag, skuName != null ? new FrontDoorSku(skuName) : null, policySettings, rules != null ? new CustomRuleList(rules?.ToList()) : null, managedRuleSets != null ? new ManagedRuleSetList(managedRuleSets?.ToList()) : null, frontendEndpointLinks?.ToList(), routingRuleLinks?.ToList(), securityPolicyLinks?.ToList(), provisioningState, resourceState); + } + + /// Initializes a new instance of ManagedRuleSetDefinition. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Provisioning state of the managed rule set. + /// Id of the managed rule set. + /// Type of the managed rule set. + /// Version of the managed rule set type. + /// Rule groups of the managed rule set. + /// A new instance for mocking. + public static ManagedRuleSetDefinition ManagedRuleSetDefinition(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string provisioningState = null, string ruleSetId = null, string ruleSetType = null, string ruleSetVersion = null, IEnumerable ruleGroups = null) + { + tags ??= new Dictionary(); + ruleGroups ??= new List(); + + return new ManagedRuleSetDefinition(id, name, resourceType, systemData, tags, location, provisioningState, ruleSetId, ruleSetType, ruleSetVersion, ruleGroups?.ToList()); + } + + /// Initializes a new instance of ManagedRuleGroupDefinition. + /// Name of the managed rule group. + /// Description of the managed rule group. + /// List of rules within the managed rule group. + /// A new instance for mocking. + public static ManagedRuleGroupDefinition ManagedRuleGroupDefinition(string ruleGroupName = null, string description = null, IEnumerable rules = null) + { + rules ??= new List(); + + return new ManagedRuleGroupDefinition(ruleGroupName, description, rules?.ToList()); + } + + /// Initializes a new instance of ManagedRuleDefinition. + /// Identifier for the managed rule. + /// Describes the default state for the managed rule. + /// Describes the default action to be applied when the managed rule matches. + /// Describes the functionality of the managed rule. + /// A new instance for mocking. + public static ManagedRuleDefinition ManagedRuleDefinition(string ruleId = null, ManagedRuleEnabledState? defaultState = null, RuleMatchActionType? defaultAction = null, string description = null) + { + return new ManagedRuleDefinition(ruleId, defaultState, defaultAction, description); + } + + /// Initializes a new instance of FrontDoorNameAvailabilityResult. + /// Indicates whether the name is available. + /// The reason why the name is not available. + /// The detailed error message describing why the name is not available. + /// A new instance for mocking. + public static FrontDoorNameAvailabilityResult FrontDoorNameAvailabilityResult(FrontDoorNameAvailabilityState? nameAvailability = null, string reason = null, string message = null) + { + return new FrontDoorNameAvailabilityResult(nameAvailability, reason, message); + } + + /// Initializes a new instance of FrontDoorData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// A friendly name for the frontDoor. + /// Routing rules associated with this Front Door. + /// Load balancing settings associated with this Front Door instance. + /// Health probe settings associated with this Front Door instance. + /// Backend pools available to routing rules. + /// Frontend endpoints available to routing rules. + /// Settings for all backendPools. + /// Operational status of the Front Door load balancer. Permitted values are 'Enabled' or 'Disabled'. + /// Resource status of the Front Door. + /// Provisioning state of the Front Door. + /// The host that each frontendEndpoint must CNAME to. + /// The Id of the frontdoor. + /// Rules Engine Configurations available to routing rules. + /// Key-Value pair representing additional properties for frontdoor. + /// A new instance for mocking. + public static FrontDoorData FrontDoorData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string friendlyName = null, IEnumerable routingRules = null, IEnumerable loadBalancingSettings = null, IEnumerable healthProbeSettings = null, IEnumerable backendPools = null, IEnumerable frontendEndpoints = null, BackendPoolsSettings backendPoolsSettings = null, FrontDoorEnabledState? enabledState = null, FrontDoorResourceState? resourceState = null, string provisioningState = null, string cname = null, string frontdoorId = null, IEnumerable rulesEngines = null, IReadOnlyDictionary extendedProperties = null) + { + tags ??= new Dictionary(); + routingRules ??= new List(); + loadBalancingSettings ??= new List(); + healthProbeSettings ??= new List(); + backendPools ??= new List(); + frontendEndpoints ??= new List(); + rulesEngines ??= new List(); + extendedProperties ??= new Dictionary(); + + return new FrontDoorData(id, name, resourceType, systemData, tags, location, friendlyName, routingRules?.ToList(), loadBalancingSettings?.ToList(), healthProbeSettings?.ToList(), backendPools?.ToList(), frontendEndpoints?.ToList(), backendPoolsSettings, enabledState, resourceState, provisioningState, cname, frontdoorId, rulesEngines?.ToList(), extendedProperties); + } + + /// Initializes a new instance of FrontDoorRulesEngineData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// A list of rules that define a particular Rules Engine Configuration. + /// Resource status. + /// A new instance for mocking. + public static FrontDoorRulesEngineData FrontDoorRulesEngineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable rules = null, FrontDoorResourceState? resourceState = null) + { + rules ??= new List(); + + return new FrontDoorRulesEngineData(id, name, resourceType, systemData, rules?.ToList(), resourceState); + } + + /// Initializes a new instance of RoutingRuleData. + /// Resource ID. + /// Resource name. + /// Resource type. + /// Frontend endpoints associated with this rule. + /// Protocol schemes to match for this rule. + /// The route patterns of the rule. + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. + /// + /// A reference to the routing configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// A reference to a specific Rules Engine Configuration to apply to this route. + /// Defines the Web Application Firewall policy for each routing rule (if applicable). + /// Resource status. + /// A new instance for mocking. + public static RoutingRuleData RoutingRuleData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, IEnumerable frontendEndpoints = null, IEnumerable acceptedProtocols = null, IEnumerable patternsToMatch = null, RoutingRuleEnabledState? enabledState = null, RouteConfiguration routeConfiguration = null, ResourceIdentifier rulesEngineId = null, ResourceIdentifier webApplicationFirewallPolicyLinkId = null, FrontDoorResourceState? resourceState = null) + { + frontendEndpoints ??= new List(); + acceptedProtocols ??= new List(); + patternsToMatch ??= new List(); + + return new RoutingRuleData(id, name, resourceType, frontendEndpoints?.ToList(), acceptedProtocols?.ToList(), patternsToMatch?.ToList(), enabledState, routeConfiguration, rulesEngineId != null ? ResourceManagerModelFactory.WritableSubResource(rulesEngineId) : null, webApplicationFirewallPolicyLinkId != null ? ResourceManagerModelFactory.WritableSubResource(webApplicationFirewallPolicyLinkId) : null, resourceState); + } + + /// Initializes a new instance of FrontDoorResourceData. + /// Resource ID. + /// Resource name. + /// Resource type. + /// A new instance for mocking. + public static FrontDoorResourceData FrontDoorResourceData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null) + { + return new FrontDoorResourceData(id, name, resourceType); + } + + /// Initializes a new instance of FrontDoorLoadBalancingSettingsData. + /// Resource ID. + /// Resource name. + /// Resource type. + /// The number of samples to consider for load balancing decisions. + /// The number of samples within the sample period that must succeed. + /// The additional latency in milliseconds for probes to fall into the lowest latency bucket. + /// Resource status. + /// A new instance for mocking. + public static FrontDoorLoadBalancingSettingsData FrontDoorLoadBalancingSettingsData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, int? sampleSize = null, int? successfulSamplesRequired = null, int? additionalLatencyMilliseconds = null, FrontDoorResourceState? resourceState = null) + { + return new FrontDoorLoadBalancingSettingsData(id, name, resourceType, sampleSize, successfulSamplesRequired, additionalLatencyMilliseconds, resourceState); + } + + /// Initializes a new instance of FrontDoorHealthProbeSettingsData. + /// Resource ID. + /// Resource name. + /// Resource type. + /// The path to use for the health probe. Default is /. + /// Protocol scheme to use for this probe. + /// The number of seconds between health probes. + /// Configures which HTTP method to use to probe the backends defined under backendPools. + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. + /// Resource status. + /// A new instance for mocking. + public static FrontDoorHealthProbeSettingsData FrontDoorHealthProbeSettingsData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, string path = null, FrontDoorProtocol? protocol = null, int? intervalInSeconds = null, FrontDoorHealthProbeMethod? healthProbeMethod = null, HealthProbeEnabled? enabledState = null, FrontDoorResourceState? resourceState = null) + { + return new FrontDoorHealthProbeSettingsData(id, name, resourceType, path, protocol, intervalInSeconds, healthProbeMethod, enabledState, resourceState); + } + + /// Initializes a new instance of FrontDoorBackendPool. + /// Resource ID. + /// Resource name. + /// Resource type. + /// The set of backends for this pool. + /// Load balancing settings for a backend pool. + /// L7 health probe settings for a backend pool. + /// Resource status. + /// A new instance for mocking. + public static FrontDoorBackendPool FrontDoorBackendPool(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, IEnumerable backends = null, ResourceIdentifier loadBalancingSettingsId = null, ResourceIdentifier healthProbeSettingsId = null, FrontDoorResourceState? resourceState = null) + { + backends ??= new List(); + + return new FrontDoorBackendPool(id, name, resourceType, backends?.ToList(), loadBalancingSettingsId != null ? ResourceManagerModelFactory.WritableSubResource(loadBalancingSettingsId) : null, healthProbeSettingsId != null ? ResourceManagerModelFactory.WritableSubResource(healthProbeSettingsId) : null, resourceState); + } + + /// Initializes a new instance of FrontDoorBackend. + /// Location of the backend (IP address or FQDN). + /// The Alias of the Private Link resource. Populating this optional field indicates that this backend is 'Private'. + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'. + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated. + /// The Approval status for the connection to the Private Link. + /// A custom message to be included in the approval request to connect to the Private Link. + /// The HTTP TCP port number. Must be between 1 and 65535. + /// The HTTPS TCP port number. Must be between 1 and 65535. + /// Whether to enable use of this backend. Permitted values are 'Enabled' or 'Disabled'. + /// Priority to use for load balancing. Higher priorities will not be used for load balancing if any lower priority backend is healthy. + /// Weight of this endpoint for load balancing purposes. + /// The value to use as the host header sent to the backend. If blank or unspecified, this defaults to the incoming host. + /// A new instance for mocking. + public static FrontDoorBackend FrontDoorBackend(string address = null, string privateLinkAlias = null, ResourceIdentifier privateLinkResourceId = null, AzureLocation? privateLinkLocation = null, BackendPrivateEndpointStatus? privateEndpointStatus = null, string privateLinkApprovalMessage = null, int? httpPort = null, int? httpsPort = null, BackendEnabledState? enabledState = null, int? priority = null, int? weight = null, string backendHostHeader = null) + { + return new FrontDoorBackend(address, privateLinkAlias, privateLinkResourceId, privateLinkLocation, privateEndpointStatus, privateLinkApprovalMessage, httpPort, httpsPort, enabledState, priority, weight, backendHostHeader); + } + + /// Initializes a new instance of FrontendEndpointData. + /// Resource ID. + /// Resource name. + /// Resource type. + /// The host name of the frontendEndpoint. Must be a domain name. + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. + /// UNUSED. This field will be ignored. The TTL to use in seconds for session affinity, if applicable. + /// Defines the Web Application Firewall policy for each host (if applicable). + /// Resource status. + /// Provisioning status of Custom Https of the frontendEndpoint. + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + /// The configuration specifying how to enable HTTPS. + /// A new instance for mocking. + public static FrontendEndpointData FrontendEndpointData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, string hostName = null, SessionAffinityEnabledState? sessionAffinityEnabledState = null, int? sessionAffinityTtlInSeconds = null, ResourceIdentifier webApplicationFirewallPolicyLinkId = null, FrontDoorResourceState? resourceState = null, FrontendEndpointCustomHttpsProvisioningState? customHttpsProvisioningState = null, FrontendEndpointCustomHttpsProvisioningSubstate? customHttpsProvisioningSubstate = null, CustomHttpsConfiguration customHttpsConfiguration = null) + { + return new FrontendEndpointData(id, name, resourceType, hostName, sessionAffinityEnabledState, sessionAffinityTtlInSeconds, webApplicationFirewallPolicyLinkId != null ? ResourceManagerModelFactory.WritableSubResource(webApplicationFirewallPolicyLinkId) : null, resourceState, customHttpsProvisioningState, customHttpsProvisioningSubstate, customHttpsConfiguration); + } + + /// Initializes a new instance of FrontDoorValidateCustomDomainResult. + /// Indicates whether the custom domain is valid or not. + /// The reason why the custom domain is not valid. + /// Error message describing why the custom domain is not valid. + /// A new instance for mocking. + public static FrontDoorValidateCustomDomainResult FrontDoorValidateCustomDomainResult(bool? isCustomDomainValidated = null, string reason = null, string message = null) + { + return new FrontDoorValidateCustomDomainResult(isCustomDomainValidated, reason, message); + } + + /// Initializes a new instance of FrontDoorNetworkExperimentProfileData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Gets a unique read-only string that changes whenever the resource is updated. + /// Resource status. + /// The state of the Experiment. + /// A new instance for mocking. + public static FrontDoorNetworkExperimentProfileData FrontDoorNetworkExperimentProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, NetworkExperimentResourceState? resourceState = null, FrontDoorExperimentState? enabledState = null) + { + tags ??= new Dictionary(); + + return new FrontDoorNetworkExperimentProfileData(id, name, resourceType, systemData, tags, location, etag, resourceState, enabledState); + } + + /// Initializes a new instance of PreconfiguredEndpoint. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The description of the endpoint. + /// The endpoint that is preconfigured. + /// The type of endpoint. + /// The preconfigured endpoint backend. + /// A new instance for mocking. + public static PreconfiguredEndpoint PreconfiguredEndpoint(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string description = null, string endpoint = null, FrontDoorEndpointType? endpointType = null, string backend = null) + { + tags ??= new Dictionary(); + + return new PreconfiguredEndpoint(id, name, resourceType, systemData, tags, location, description, endpoint, endpointType, backend); + } + + /// Initializes a new instance of FrontDoorExperimentData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The description of the details or intents of the Experiment. + /// The endpoint A of an experiment. + /// The endpoint B of an experiment. + /// The state of the Experiment. + /// Resource status. + /// The description of Experiment status from the server side. + /// The uri to the Script used in the Experiment. + /// A new instance for mocking. + public static FrontDoorExperimentData FrontDoorExperimentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string description = null, FrontDoorExperimentEndpointProperties experimentEndpointA = null, FrontDoorExperimentEndpointProperties experimentEndpointB = null, FrontDoorExperimentState? enabledState = null, NetworkExperimentResourceState? resourceState = null, string status = null, Uri scriptFileUri = null) + { + tags ??= new Dictionary(); + + return new FrontDoorExperimentData(id, name, resourceType, systemData, tags, location, description, experimentEndpointA, experimentEndpointB, enabledState, resourceState, status, scriptFileUri); + } + + /// Initializes a new instance of LatencyScorecard. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The unique identifier of the Latency Scorecard. + /// The name of the Latency Scorecard. + /// The description of the Latency Scorecard. + /// The A endpoint in the scorecard. + /// The B endpoint in the scorecard. + /// The start time of the Latency Scorecard in UTC. + /// The end time of the Latency Scorecard in UTC. + /// The country associated with the Latency Scorecard. Values are country ISO codes as specified here- https://www.iso.org/iso-3166-country-codes.html. + /// The latency metrics of the Latency Scorecard. + /// A new instance for mocking. + public static LatencyScorecard LatencyScorecard(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string latencyScorecardId = null, string latencyScorecardName = null, string description = null, Uri scorecardEndpointA = null, Uri scorecardEndpointB = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string country = null, IEnumerable latencyMetrics = null) + { + tags ??= new Dictionary(); + latencyMetrics ??= new List(); + + return new LatencyScorecard(id, name, resourceType, systemData, tags, location, latencyScorecardId, latencyScorecardName, description, scorecardEndpointA, scorecardEndpointB, startOn, endOn, country, latencyMetrics?.ToList()); + } + + /// Initializes a new instance of LatencyMetric. + /// The name of the Latency Metric. + /// The end time of the Latency Scorecard in UTC. + /// The metric value of the A endpoint. + /// The metric value of the B endpoint. + /// The difference in value between endpoint A and B. + /// The percent difference between endpoint A and B. + /// The lower end of the 95% confidence interval for endpoint A. + /// The upper end of the 95% confidence interval for endpoint A. + /// The lower end of the 95% confidence interval for endpoint B. + /// The upper end of the 95% confidence interval for endpoint B. + /// A new instance for mocking. + public static LatencyMetric LatencyMetric(string name = null, DateTimeOffset? endOn = null, float? aValue = null, float? bValue = null, float? delta = null, float? deltaPercent = null, float? acLower95CI = null, float? ahUpper95CI = null, float? bcLower95CI = null, float? bUpper95CI = null) + { + return new LatencyMetric(name, endOn, aValue, bValue, delta, deltaPercent, acLower95CI, ahUpper95CI, bcLower95CI, bUpper95CI); + } + + /// Initializes a new instance of FrontDoorTimeSeriesInfo. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The endpoint associated with the Timeseries data point. + /// The start DateTime of the Timeseries in UTC. + /// The end DateTime of the Timeseries in UTC. + /// The aggregation interval of the Timeseries. + /// The type of Timeseries. + /// The country associated with the Timeseries. Values are country ISO codes as specified here- https://www.iso.org/iso-3166-country-codes.html. + /// The set of data points for the timeseries. + /// A new instance for mocking. + public static FrontDoorTimeSeriesInfo FrontDoorTimeSeriesInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, Uri endpoint = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, FrontDoorTimeSeriesInfoAggregationInterval? aggregationInterval = null, FrontDoorTimeSeriesType? timeSeriesType = null, string country = null, IEnumerable timeSeriesData = null) + { + tags ??= new Dictionary(); + timeSeriesData ??= new List(); + + return new FrontDoorTimeSeriesInfo(id, name, resourceType, systemData, tags, location, endpoint, startOn, endOn, aggregationInterval, timeSeriesType, country, timeSeriesData?.ToList()); + } + } +} diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/autorest.md b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/autorest.md index 5f7773b3eef0c..596caa114b512 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/autorest.md +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/autorest.md @@ -4,7 +4,6 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true -generate-model-factory: false csharp: true library-name: FrontDoor namespace: Azure.ResourceManager.FrontDoor diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/CHANGELOG.md b/sdk/grafana/Azure.ResourceManager.Grafana/CHANGELOG.md index e69d7806c94d3..f2f4e313ff8b1 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/CHANGELOG.md +++ b/sdk/grafana/Azure.ResourceManager.Grafana/CHANGELOG.md @@ -1,15 +1,16 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2023-05-30) ### Features Added -### Breaking Changes - -### Bugs Fixed +- 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). ### Other Changes +- Upgraded dependent Azure.Core to 1.32.0. +- Upgraded dependent Azure.ResourceManager to 1.6.0. + ## 1.0.1 (2023-02-20) ### Other Changes diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/api/Azure.ResourceManager.Grafana.netstandard2.0.cs b/sdk/grafana/Azure.ResourceManager.Grafana/api/Azure.ResourceManager.Grafana.netstandard2.0.cs index 367c598cb868c..4e724febf53a0 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/api/Azure.ResourceManager.Grafana.netstandard2.0.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/api/Azure.ResourceManager.Grafana.netstandard2.0.cs @@ -130,6 +130,13 @@ protected ManagedGrafanaResource() { } } namespace Azure.ResourceManager.Grafana.Models { + public static partial class ArmGrafanaModelFactory + { + public static Azure.ResourceManager.Grafana.GrafanaPrivateEndpointConnectionData GrafanaPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.Grafana.Models.GrafanaPrivateLinkServiceConnectionState connectionState = null, System.Collections.Generic.IEnumerable groupIds = null, Azure.ResourceManager.Grafana.Models.GrafanaPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.Grafana.Models.GrafanaPrivateEndpointConnectionProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Grafana.GrafanaPrivateLinkResourceData GrafanaPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState? provisioningState = default(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState?), string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } + public static Azure.ResourceManager.Grafana.ManagedGrafanaData ManagedGrafanaData(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), string skuName = null, Azure.ResourceManager.Grafana.Models.ManagedGrafanaProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.Grafana.Models.ManagedGrafanaProperties ManagedGrafanaProperties(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState? provisioningState = default(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState?), string grafanaVersion = null, string endpoint = null, Azure.ResourceManager.Grafana.Models.GrafanaPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Grafana.Models.GrafanaPublicNetworkAccess?), Azure.ResourceManager.Grafana.Models.GrafanaZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.Grafana.Models.GrafanaZoneRedundancy?), Azure.ResourceManager.Grafana.Models.GrafanaApiKey? apiKey = default(Azure.ResourceManager.Grafana.Models.GrafanaApiKey?), Azure.ResourceManager.Grafana.Models.DeterministicOutboundIP? deterministicOutboundIP = default(Azure.ResourceManager.Grafana.Models.DeterministicOutboundIP?), System.Collections.Generic.IEnumerable outboundIPs = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.Grafana.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.Grafana.Models.AutoGeneratedDomainNameLabelScope?), System.Collections.Generic.IEnumerable monitorWorkspaceIntegrations = null) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AutoGeneratedDomainNameLabelScope : System.IEquatable { diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ArmGrafanaModelFactory.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ArmGrafanaModelFactory.cs new file mode 100644 index 0000000000000..563ac10a77bc9 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ArmGrafanaModelFactory.cs @@ -0,0 +1,95 @@ +// 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.Grafana; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Grafana.Models +{ + /// Model factory for models. + public static partial class ArmGrafanaModelFactory + { + /// Initializes a new instance of ManagedGrafanaData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The Sku of the grafana resource. + /// Properties specific to the grafana resource. + /// The managed identity of the grafana resource. + /// A new instance for mocking. + public static ManagedGrafanaData ManagedGrafanaData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string skuName = null, ManagedGrafanaProperties properties = null, ManagedServiceIdentity identity = null) + { + tags ??= new Dictionary(); + + return new ManagedGrafanaData(id, name, resourceType, systemData, tags, location, skuName != null ? new ManagedGrafanaSku(skuName) : null, properties, identity); + } + + /// Initializes a new instance of ManagedGrafanaProperties. + /// Provisioning state of the resource. + /// The Grafana software version. + /// The endpoint of the Grafana instance. + /// Indicate the state for enable or disable traffic over the public interface. + /// The zone redundancy setting of the Grafana instance. + /// The api key setting of the Grafana instance. + /// Whether a Grafana instance uses deterministic outbound IPs. + /// List of outbound IPs if deterministicOutboundIP is enabled. + /// The private endpoint connections of the Grafana instance. + /// Scope for dns deterministic name hash calculation. + /// GrafanaIntegrations is a bundled observability experience (e.g. pre-configured data source, tailored Grafana dashboards, alerting defaults) for common monitoring scenarios. + /// A new instance for mocking. + public static ManagedGrafanaProperties ManagedGrafanaProperties(GrafanaProvisioningState? provisioningState = null, string grafanaVersion = null, string endpoint = null, GrafanaPublicNetworkAccess? publicNetworkAccess = null, GrafanaZoneRedundancy? zoneRedundancy = null, GrafanaApiKey? apiKey = null, DeterministicOutboundIP? deterministicOutboundIP = null, IEnumerable outboundIPs = null, IEnumerable privateEndpointConnections = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null, IEnumerable monitorWorkspaceIntegrations = null) + { + outboundIPs ??= new List(); + privateEndpointConnections ??= new List(); + monitorWorkspaceIntegrations ??= new List(); + + return new ManagedGrafanaProperties(provisioningState, grafanaVersion, endpoint, publicNetworkAccess, zoneRedundancy, apiKey, deterministicOutboundIP, outboundIPs?.ToList(), privateEndpointConnections?.ToList(), autoGeneratedDomainNameLabelScope, monitorWorkspaceIntegrations != null ? new GrafanaIntegrations(monitorWorkspaceIntegrations?.ToList()) : null); + } + + /// Initializes a new instance of GrafanaPrivateEndpointConnectionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource of private end point. + /// A collection of information about the state of the connection between service consumer and provider. + /// The private endpoint connection group ids. + /// The provisioning state of the private endpoint connection resource. + /// A new instance for mocking. + public static GrafanaPrivateEndpointConnectionData GrafanaPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier privateEndpointId = null, GrafanaPrivateLinkServiceConnectionState connectionState = null, IEnumerable groupIds = null, GrafanaPrivateEndpointConnectionProvisioningState? provisioningState = null) + { + groupIds ??= new List(); + + return new GrafanaPrivateEndpointConnectionData(id, name, resourceType, systemData, privateEndpointId != null ? ResourceManagerModelFactory.SubResource(privateEndpointId) : null, connectionState, groupIds?.ToList(), provisioningState); + } + + /// Initializes a new instance of GrafanaPrivateLinkResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Provisioning state of the resource. + /// The private link resource group id. + /// The private link resource required member names. + /// The private link resource Private link DNS zone name. + /// A new instance for mocking. + public static GrafanaPrivateLinkResourceData GrafanaPrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, GrafanaProvisioningState? provisioningState = null, string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null) + { + requiredMembers ??= new List(); + requiredZoneNames ??= new List(); + + return new GrafanaPrivateLinkResourceData(id, name, resourceType, systemData, provisioningState, groupId, requiredMembers?.ToList(), requiredZoneNames?.ToList()); + } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/autorest.md b/sdk/grafana/Azure.ResourceManager.Grafana/src/autorest.md index 897feb5cd2326..72cc233dc6b96 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/autorest.md +++ b/sdk/grafana/Azure.ResourceManager.Grafana/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: Grafana namespace: Azure.ResourceManager.Grafana diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/CHANGELOG.md b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/CHANGELOG.md index 480f86dd11f97..216d94f849df3 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/CHANGELOG.md +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/CHANGELOG.md @@ -1,15 +1,16 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2023-05-30) ### Features Added -### Breaking Changes - -### Bugs Fixed +- 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). ### Other Changes +- Upgraded dependent Azure.Core to 1.32.0. +- Upgraded dependent Azure.ResourceManager to 1.6.0. + ## 1.0.1 (2023-02-20) ### Other Changes diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/api/Azure.ResourceManager.GuestConfiguration.netstandard2.0.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/api/Azure.ResourceManager.GuestConfiguration.netstandard2.0.cs index db7409457562e..34555c4cfbbdf 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/api/Azure.ResourceManager.GuestConfiguration.netstandard2.0.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/api/Azure.ResourceManager.GuestConfiguration.netstandard2.0.cs @@ -140,6 +140,24 @@ namespace Azure.ResourceManager.GuestConfiguration.Models public static bool operator !=(Azure.ResourceManager.GuestConfiguration.Models.ActionAfterReboot left, Azure.ResourceManager.GuestConfiguration.Models.ActionAfterReboot right) { throw null; } public override string ToString() { throw null; } } + public static partial class ArmGuestConfigurationModelFactory + { + public static Azure.ResourceManager.GuestConfiguration.Models.AssignmentReportResourceComplianceReason AssignmentReportResourceComplianceReason(string phrase = null, string code = null) { throw null; } + public static Azure.ResourceManager.GuestConfiguration.Models.AssignmentReportResourceInfo AssignmentReportResourceInfo(Azure.ResourceManager.GuestConfiguration.Models.AssignedGuestConfigurationMachineComplianceStatus? complianceStatus = default(Azure.ResourceManager.GuestConfiguration.Models.AssignedGuestConfigurationMachineComplianceStatus?), string assignmentResourceSettingName = null, System.Collections.Generic.IEnumerable reasons = null, System.BinaryData properties = null) { throw null; } + public static Azure.ResourceManager.GuestConfiguration.GuestConfigurationAssignmentData GuestConfigurationAssignmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentProperties properties = null) { throw null; } + public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentInfo GuestConfigurationAssignmentInfo(string name = null, Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationInfo configuration = null) { throw null; } + public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentProperties GuestConfigurationAssignmentProperties(string targetResourceId = null, Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationNavigation guestConfiguration = null, Azure.ResourceManager.GuestConfiguration.Models.AssignedGuestConfigurationMachineComplianceStatus? complianceStatus = default(Azure.ResourceManager.GuestConfiguration.Models.AssignedGuestConfigurationMachineComplianceStatus?), System.DateTimeOffset? lastComplianceStatusCheckedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier latestReportId = null, string parameterHash = null, Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentReportInfo latestAssignmentReport = null, string context = null, string assignmentHash = null, Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationProvisioningState? provisioningState = default(Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationProvisioningState?), string resourceType = null, System.Collections.Generic.IEnumerable vmssVmList = null) { throw null; } + public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentReport GuestConfigurationAssignmentReport(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentReportProperties properties = null) { throw null; } + public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentReportDetails GuestConfigurationAssignmentReportDetails(Azure.ResourceManager.GuestConfiguration.Models.AssignedGuestConfigurationMachineComplianceStatus? complianceStatus = default(Azure.ResourceManager.GuestConfiguration.Models.AssignedGuestConfigurationMachineComplianceStatus?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Guid? jobId = default(System.Guid?), Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentReportType? operationType = default(Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentReportType?), System.Collections.Generic.IEnumerable resources = null) { throw null; } + public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentReportInfo GuestConfigurationAssignmentReportInfo(Azure.Core.ResourceIdentifier id = null, System.Guid? reportId = default(System.Guid?), Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentInfo assignment = null, Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationVmInfo vm = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.GuestConfiguration.Models.AssignedGuestConfigurationMachineComplianceStatus? complianceStatus = default(Azure.ResourceManager.GuestConfiguration.Models.AssignedGuestConfigurationMachineComplianceStatus?), Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentReportType? operationType = default(Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentReportType?), System.Collections.Generic.IEnumerable resources = null) { throw null; } + public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentReportProperties GuestConfigurationAssignmentReportProperties(Azure.ResourceManager.GuestConfiguration.Models.AssignedGuestConfigurationMachineComplianceStatus? complianceStatus = default(Azure.ResourceManager.GuestConfiguration.Models.AssignedGuestConfigurationMachineComplianceStatus?), System.Guid? reportId = default(System.Guid?), Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentInfo assignment = null, Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationVmInfo vm = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentReportDetails details = null, string vmssResourceId = null) { throw null; } + public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationInfo GuestConfigurationInfo(string name = null, string version = null) { throw null; } + public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationNavigation GuestConfigurationNavigation(Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationKind? kind = default(Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationKind?), string name = null, string version = null, System.Uri contentUri = null, string contentHash = null, Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentType? assignmentType = default(Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentType?), string assignmentSource = null, string contentType = null, System.Collections.Generic.IEnumerable configurationParameters = null, System.Collections.Generic.IEnumerable configurationProtectedParameters = null, Azure.ResourceManager.GuestConfiguration.Models.LcmConfigurationSetting configurationSetting = null) { throw null; } + public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationResourceData GuestConfigurationResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ResourceManager.Models.SystemData systemData = null) { throw null; } + public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationVmInfo GuestConfigurationVmInfo(Azure.Core.ResourceIdentifier id = null, System.Guid? uuid = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationVmssVmInfo GuestConfigurationVmssVmInfo(System.Guid? vmId = default(System.Guid?), Azure.Core.ResourceIdentifier vmResourceId = null, Azure.ResourceManager.GuestConfiguration.Models.AssignedGuestConfigurationMachineComplianceStatus? complianceStatus = default(Azure.ResourceManager.GuestConfiguration.Models.AssignedGuestConfigurationMachineComplianceStatus?), System.Guid? latestReportId = default(System.Guid?), System.DateTimeOffset? lastComplianceCheckedOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.GuestConfiguration.Models.LcmConfigurationSetting LcmConfigurationSetting(Azure.ResourceManager.GuestConfiguration.Models.LcmConfigurationMode? configurationMode = default(Azure.ResourceManager.GuestConfiguration.Models.LcmConfigurationMode?), bool? isModuleOverwriteAllowed = default(bool?), Azure.ResourceManager.GuestConfiguration.Models.ActionAfterReboot? actionAfterReboot = default(Azure.ResourceManager.GuestConfiguration.Models.ActionAfterReboot?), float? refreshFrequencyInMins = default(float?), bool? rebootIfNeeded = default(bool?), float? configurationModeFrequencyInMins = default(float?)) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AssignedGuestConfigurationMachineComplianceStatus : System.IEquatable { diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/ArmGuestConfigurationModelFactory.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/ArmGuestConfigurationModelFactory.cs new file mode 100644 index 0000000000000..242f424c5bf22 --- /dev/null +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/ArmGuestConfigurationModelFactory.cs @@ -0,0 +1,219 @@ +// 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.GuestConfiguration; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.GuestConfiguration.Models +{ + /// Model factory for models. + public static partial class ArmGuestConfigurationModelFactory + { + /// Initializes a new instance of GuestConfigurationAssignmentData. + /// ARM resource id of the guest configuration assignment. + /// Name of the guest configuration assignment. + /// Region where the VM is located. + /// The type of the resource. + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// Properties of the Guest configuration assignment. + /// A new instance for mocking. + public static GuestConfigurationAssignmentData GuestConfigurationAssignmentData(ResourceIdentifier id = null, string name = null, AzureLocation? location = null, ResourceType? resourceType = null, SystemData systemData = null, GuestConfigurationAssignmentProperties properties = null) + { + return new GuestConfigurationAssignmentData(id, name, location, resourceType, systemData, properties); + } + + /// Initializes a new instance of GuestConfigurationAssignmentProperties. + /// VM resource Id. + /// The guest configuration to assign. + /// A value indicating compliance status of the machine for the assigned guest configuration. + /// Date and time when last compliance status was checked. + /// Id of the latest report for the guest configuration assignment. + /// parameter hash for the guest configuration assignment. + /// Last reported guest configuration assignment report. + /// The source which initiated the guest configuration assignment. Ex: Azure Policy. + /// Combined hash of the configuration package and parameters. + /// The provisioning state, which only appears in the response. + /// Type of the resource - VMSS / VM. + /// The list of VM Compliance data for VMSS. + /// A new instance for mocking. + public static GuestConfigurationAssignmentProperties GuestConfigurationAssignmentProperties(string targetResourceId = null, GuestConfigurationNavigation guestConfiguration = null, AssignedGuestConfigurationMachineComplianceStatus? complianceStatus = null, DateTimeOffset? lastComplianceStatusCheckedOn = null, ResourceIdentifier latestReportId = null, string parameterHash = null, GuestConfigurationAssignmentReportInfo latestAssignmentReport = null, string context = null, string assignmentHash = null, GuestConfigurationProvisioningState? provisioningState = null, string resourceType = null, IEnumerable vmssVmList = null) + { + vmssVmList ??= new List(); + + return new GuestConfigurationAssignmentProperties(targetResourceId, guestConfiguration, complianceStatus, lastComplianceStatusCheckedOn, latestReportId, parameterHash, latestAssignmentReport, context, assignmentHash, provisioningState, resourceType, vmssVmList?.ToList()); + } + + /// Initializes a new instance of GuestConfigurationNavigation. + /// Kind of the guest configuration. For example:DSC. + /// Name of the guest configuration. + /// Version of the guest configuration. + /// Uri of the storage where guest configuration package is uploaded. + /// Combined hash of the guest configuration package and configuration parameters. + /// Specifies the assignment type and execution of the configuration. Possible values are Audit, DeployAndAutoCorrect, ApplyAndAutoCorrect and ApplyAndMonitor. + /// Specifies the origin of the configuration. + /// Specifies the content type of the configuration. Possible values could be Builtin or Custom. + /// The configuration parameters for the guest configuration. + /// The protected configuration parameters for the guest configuration. + /// The configuration setting for the guest configuration. + /// A new instance for mocking. + public static GuestConfigurationNavigation GuestConfigurationNavigation(GuestConfigurationKind? kind = null, string name = null, string version = null, Uri contentUri = null, string contentHash = null, GuestConfigurationAssignmentType? assignmentType = null, string assignmentSource = null, string contentType = null, IEnumerable configurationParameters = null, IEnumerable configurationProtectedParameters = null, LcmConfigurationSetting configurationSetting = null) + { + configurationParameters ??= new List(); + configurationProtectedParameters ??= new List(); + + return new GuestConfigurationNavigation(kind, name, version, contentUri, contentHash, assignmentType, assignmentSource, contentType, configurationParameters?.ToList(), configurationProtectedParameters?.ToList(), configurationSetting); + } + + /// Initializes a new instance of LcmConfigurationSetting. + /// Specifies how the LCM(Local Configuration Manager) actually applies the configuration to the target nodes. Possible values are ApplyOnly, ApplyAndMonitor, and ApplyAndAutoCorrect. + /// If true - new configurations downloaded from the pull service are allowed to overwrite the old ones on the target node. Otherwise, false. + /// Specifies what happens after a reboot during the application of a configuration. The possible values are ContinueConfiguration and StopConfiguration. + /// The time interval, in minutes, at which the LCM checks a pull service to get updated configurations. This value is ignored if the LCM is not configured in pull mode. The default value is 30. + /// Set this to true to automatically reboot the node after a configuration that requires reboot is applied. Otherwise, you will have to manually reboot the node for any configuration that requires it. The default value is false. To use this setting when a reboot condition is enacted by something other than DSC (such as Windows Installer), combine this setting with the xPendingReboot module. + /// How often, in minutes, the current configuration is checked and applied. This property is ignored if the ConfigurationMode property is set to ApplyOnly. The default value is 15. + /// A new instance for mocking. + public static LcmConfigurationSetting LcmConfigurationSetting(LcmConfigurationMode? configurationMode = null, bool? isModuleOverwriteAllowed = null, ActionAfterReboot? actionAfterReboot = null, float? refreshFrequencyInMins = null, bool? rebootIfNeeded = null, float? configurationModeFrequencyInMins = null) + { + return new LcmConfigurationSetting(configurationMode, isModuleOverwriteAllowed, actionAfterReboot, refreshFrequencyInMins, rebootIfNeeded, configurationModeFrequencyInMins); + } + + /// Initializes a new instance of GuestConfigurationAssignmentReportInfo. + /// ARM resource id of the report for the guest configuration assignment. + /// GUID that identifies the guest configuration assignment report under a subscription, resource group. + /// Configuration details of the guest configuration assignment. + /// Information about the VM. + /// Start date and time of the guest configuration assignment compliance status check. + /// End date and time of the guest configuration assignment compliance status check. + /// A value indicating compliance status of the machine for the assigned guest configuration. + /// Type of report, Consistency or Initial. + /// The list of resources for which guest configuration assignment compliance is checked. + /// A new instance for mocking. + public static GuestConfigurationAssignmentReportInfo GuestConfigurationAssignmentReportInfo(ResourceIdentifier id = null, Guid? reportId = null, GuestConfigurationAssignmentInfo assignment = null, GuestConfigurationVmInfo vm = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, AssignedGuestConfigurationMachineComplianceStatus? complianceStatus = null, GuestConfigurationAssignmentReportType? operationType = null, IEnumerable resources = null) + { + resources ??= new List(); + + return new GuestConfigurationAssignmentReportInfo(id, reportId, assignment, vm, startOn, endOn, complianceStatus, operationType, resources?.ToList()); + } + + /// Initializes a new instance of GuestConfigurationAssignmentInfo. + /// Name of the guest configuration assignment. + /// Information about the configuration. + /// A new instance for mocking. + public static GuestConfigurationAssignmentInfo GuestConfigurationAssignmentInfo(string name = null, GuestConfigurationInfo configuration = null) + { + return new GuestConfigurationAssignmentInfo(name, configuration); + } + + /// Initializes a new instance of GuestConfigurationInfo. + /// Name of the configuration. + /// Version of the configuration. + /// A new instance for mocking. + public static GuestConfigurationInfo GuestConfigurationInfo(string name = null, string version = null) + { + return new GuestConfigurationInfo(name, version); + } + + /// Initializes a new instance of GuestConfigurationVmInfo. + /// Azure resource Id of the VM. + /// UUID(Universally Unique Identifier) of the VM. + /// A new instance for mocking. + public static GuestConfigurationVmInfo GuestConfigurationVmInfo(ResourceIdentifier id = null, Guid? uuid = null) + { + return new GuestConfigurationVmInfo(id, uuid); + } + + /// Initializes a new instance of AssignmentReportResourceInfo. + /// A value indicating compliance status of the machine for the assigned guest configuration. + /// Name of the guest configuration assignment resource setting. + /// Compliance reason and reason code for a resource. + /// Properties of a guest configuration assignment resource. + /// A new instance for mocking. + public static AssignmentReportResourceInfo AssignmentReportResourceInfo(AssignedGuestConfigurationMachineComplianceStatus? complianceStatus = null, string assignmentResourceSettingName = null, IEnumerable reasons = null, BinaryData properties = null) + { + reasons ??= new List(); + + return new AssignmentReportResourceInfo(complianceStatus, assignmentResourceSettingName, reasons?.ToList(), properties); + } + + /// Initializes a new instance of AssignmentReportResourceComplianceReason. + /// Reason for the compliance of the guest configuration assignment resource. + /// Code for the compliance of the guest configuration assignment resource. + /// A new instance for mocking. + public static AssignmentReportResourceComplianceReason AssignmentReportResourceComplianceReason(string phrase = null, string code = null) + { + return new AssignmentReportResourceComplianceReason(phrase, code); + } + + /// Initializes a new instance of GuestConfigurationVmssVmInfo. + /// UUID of the VM. + /// Azure resource Id of the VM. + /// A value indicating compliance status of the machine for the assigned guest configuration. + /// Id of the latest report for the guest configuration assignment. + /// Date and time when last compliance status was checked. + /// A new instance for mocking. + public static GuestConfigurationVmssVmInfo GuestConfigurationVmssVmInfo(Guid? vmId = null, ResourceIdentifier vmResourceId = null, AssignedGuestConfigurationMachineComplianceStatus? complianceStatus = null, Guid? latestReportId = null, DateTimeOffset? lastComplianceCheckedOn = null) + { + return new GuestConfigurationVmssVmInfo(vmId, vmResourceId, complianceStatus, latestReportId, lastComplianceCheckedOn); + } + + /// Initializes a new instance of GuestConfigurationResourceData. + /// ARM resource id of the guest configuration assignment. + /// Name of the guest configuration assignment. + /// Region where the VM is located. + /// The type of the resource. + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// A new instance for mocking. + public static GuestConfigurationResourceData GuestConfigurationResourceData(ResourceIdentifier id = null, string name = null, AzureLocation? location = null, ResourceType? resourceType = null, SystemData systemData = null) + { + return new GuestConfigurationResourceData(id, name, location, resourceType, systemData); + } + + /// Initializes a new instance of GuestConfigurationAssignmentReport. + /// ARM resource id of the report for the guest configuration assignment. + /// GUID that identifies the guest configuration assignment report under a subscription, resource group. + /// Properties of the guest configuration report. + /// A new instance for mocking. + public static GuestConfigurationAssignmentReport GuestConfigurationAssignmentReport(ResourceIdentifier id = null, string name = null, GuestConfigurationAssignmentReportProperties properties = null) + { + return new GuestConfigurationAssignmentReport(id, name, properties); + } + + /// Initializes a new instance of GuestConfigurationAssignmentReportProperties. + /// A value indicating compliance status of the machine for the assigned guest configuration. + /// GUID that identifies the guest configuration assignment report under a subscription, resource group. + /// Configuration details of the guest configuration assignment. + /// Information about the VM. + /// Start date and time of the guest configuration assignment compliance status check. + /// End date and time of the guest configuration assignment compliance status check. + /// Details of the assignment report. + /// Azure resource Id of the VMSS. + /// A new instance for mocking. + public static GuestConfigurationAssignmentReportProperties GuestConfigurationAssignmentReportProperties(AssignedGuestConfigurationMachineComplianceStatus? complianceStatus = null, Guid? reportId = null, GuestConfigurationAssignmentInfo assignment = null, GuestConfigurationVmInfo vm = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, GuestConfigurationAssignmentReportDetails details = null, string vmssResourceId = null) + { + return new GuestConfigurationAssignmentReportProperties(complianceStatus, reportId, assignment, vm, startOn, endOn, details, vmssResourceId); + } + + /// Initializes a new instance of GuestConfigurationAssignmentReportDetails. + /// A value indicating compliance status of the machine for the assigned guest configuration. + /// Start date and time of the guest configuration assignment compliance status check. + /// End date and time of the guest configuration assignment compliance status check. + /// GUID of the report. + /// Type of report, Consistency or Initial. + /// The list of resources for which guest configuration assignment compliance is checked. + /// A new instance for mocking. + public static GuestConfigurationAssignmentReportDetails GuestConfigurationAssignmentReportDetails(AssignedGuestConfigurationMachineComplianceStatus? complianceStatus = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, Guid? jobId = null, GuestConfigurationAssignmentReportType? operationType = null, IEnumerable resources = null) + { + resources ??= new List(); + + return new GuestConfigurationAssignmentReportDetails(complianceStatus, startOn, endOn, jobId, operationType, resources?.ToList()); + } + } +} diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/autorest.md b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/autorest.md index 89d0aee2938fe..50aa26fd14bdb 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/autorest.md +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/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: GuestConfiguration namespace: Azure.ResourceManager.GuestConfiguration diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/CHANGELOG.md b/sdk/hdinsight/Azure.ResourceManager.HDInsight/CHANGELOG.md index 7b8b6e330910a..8222ba65f9a0f 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/CHANGELOG.md +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/CHANGELOG.md @@ -1,15 +1,16 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2023-05-30) ### Features Added -### Breaking Changes - -### Bugs Fixed +- 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). ### Other Changes +- Upgraded dependent Azure.Core to 1.32.0. +- Upgraded dependent Azure.ResourceManager to 1.6.0. + ## 1.0.1 (2023-02-15) ### Other Changes diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/api/Azure.ResourceManager.HDInsight.netstandard2.0.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/api/Azure.ResourceManager.HDInsight.netstandard2.0.cs index 73f21537fb73d..570708ee7971a 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/api/Azure.ResourceManager.HDInsight.netstandard2.0.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/api/Azure.ResourceManager.HDInsight.netstandard2.0.cs @@ -248,6 +248,45 @@ public HDInsightPrivateLinkResourceData() { } } namespace Azure.ResourceManager.HDInsight.Models { + public static partial class ArmHDInsightModelFactory + { + public static Azure.ResourceManager.HDInsight.HDInsightApplicationData HDInsightApplicationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.HDInsight.Models.HDInsightApplicationProperties properties = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightApplicationHttpsEndpoint HDInsightApplicationHttpsEndpoint(System.Collections.Generic.IEnumerable accessModes = null, string endpointLocation = null, int? destinationPort = default(int?), int? publicPort = default(int?), System.Net.IPAddress privateIPAddress = null, string subDomainSuffix = null, bool? disableGatewayAuth = default(bool?)) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightApplicationProperties HDInsightApplicationProperties(System.Collections.Generic.IEnumerable computeRoles = null, System.Collections.Generic.IEnumerable installScriptActions = null, System.Collections.Generic.IEnumerable uninstallScriptActions = null, System.Collections.Generic.IEnumerable httpsEndpoints = null, System.Collections.Generic.IEnumerable sshEndpoints = null, string provisioningState = null, string applicationType = null, string applicationState = null, System.Collections.Generic.IEnumerable errors = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string marketplaceIdentifier = null, System.Collections.Generic.IEnumerable privateLinkConfigurations = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightAsyncOperationResult HDInsightAsyncOperationResult(Azure.ResourceManager.HDInsight.Models.HDInsightAsyncOperationState? status = default(Azure.ResourceManager.HDInsight.Models.HDInsightAsyncOperationState?), Azure.ResponseError error = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightAzureMonitorExtensionStatus HDInsightAzureMonitorExtensionStatus(bool? isClusterMonitoringEnabled = default(bool?), string workspaceId = null, Azure.ResourceManager.HDInsight.Models.HDInsightAzureMonitorSelectedConfigurations selectedConfigurations = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightBillingMeters HDInsightBillingMeters(string meterParameter = null, string meter = null, string unit = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightBillingResources HDInsightBillingResources(Azure.Core.AzureLocation? region = default(Azure.Core.AzureLocation?), System.Collections.Generic.IEnumerable billingMeters = null, System.Collections.Generic.IEnumerable diskBillingMeters = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightBillingSpecsListResult HDInsightBillingSpecsListResult(System.Collections.Generic.IEnumerable vmSizes = null, System.Collections.Generic.IEnumerable vmSizesWithEncryptionAtHost = null, System.Collections.Generic.IEnumerable vmSizeFilters = null, System.Collections.Generic.IEnumerable vmSizeProperties = null, System.Collections.Generic.IEnumerable billingResources = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightCapabilitiesResult HDInsightCapabilitiesResult(System.Collections.Generic.IReadOnlyDictionary versions = null, System.Collections.Generic.IReadOnlyDictionary regions = null, System.Collections.Generic.IEnumerable features = null, Azure.ResourceManager.HDInsight.Models.QuotaCapability quota = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterAaddsDetail HDInsightClusterAaddsDetail(string domainName = null, bool? isInitialSyncComplete = default(bool?), bool? isLdapsEnabled = default(bool?), string ldapsPublicCertificateInBase64 = null, Azure.Core.ResourceIdentifier resourceId = null, Azure.Core.ResourceIdentifier subnetId = null, System.Guid? tenantId = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterConfigurations HDInsightClusterConfigurations(System.Collections.Generic.IReadOnlyDictionary> configurations = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterCreationValidateResult HDInsightClusterCreationValidateResult(System.Collections.Generic.IEnumerable validationErrors = null, System.Collections.Generic.IEnumerable validationWarnings = null, System.TimeSpan? estimatedCreationDuration = default(System.TimeSpan?), System.Collections.Generic.IEnumerable aaddsResourcesDetails = null) { throw null; } + public static Azure.ResourceManager.HDInsight.HDInsightClusterData HDInsightClusterData(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.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.HDInsight.Models.HDInsightClusterProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterDataDiskGroup HDInsightClusterDataDiskGroup(int? disksPerNode = default(int?), string storageAccountType = null, int? diskSizeInGB = default(int?)) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterExtensionStatus HDInsightClusterExtensionStatus(bool? isClusterMonitoringEnabled = default(bool?), string workspaceId = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterHostInfo HDInsightClusterHostInfo(string name = null, string fqdn = null, System.Uri effectiveDiskEncryptionKeyUri = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterProperties HDInsightClusterProperties(string clusterVersion = null, string clusterHdpVersion = null, Azure.ResourceManager.HDInsight.Models.HDInsightOSType? osType = default(Azure.ResourceManager.HDInsight.Models.HDInsightOSType?), Azure.ResourceManager.HDInsight.Models.HDInsightTier? tier = default(Azure.ResourceManager.HDInsight.Models.HDInsightTier?), string clusterId = null, Azure.ResourceManager.HDInsight.Models.HDInsightClusterDefinition clusterDefinition = null, Azure.ResourceManager.HDInsight.Models.KafkaRestProperties kafkaRestProperties = null, Azure.ResourceManager.HDInsight.Models.HDInsightSecurityProfile securityProfile = null, System.Collections.Generic.IEnumerable computeRoles = null, Azure.ResourceManager.HDInsight.Models.HDInsightClusterProvisioningState? provisioningState = default(Azure.ResourceManager.HDInsight.Models.HDInsightClusterProvisioningState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string clusterState = null, int? quotaInfoCoresUsed = default(int?), System.Collections.Generic.IEnumerable errors = null, System.Collections.Generic.IEnumerable connectivityEndpoints = null, Azure.ResourceManager.HDInsight.Models.HDInsightDiskEncryptionProperties diskEncryptionProperties = null, bool? isEncryptionInTransitEnabled = default(bool?), System.Collections.Generic.IEnumerable storageAccounts = null, string minSupportedTlsVersion = null, Azure.ResourceManager.HDInsight.Models.ExcludedServicesConfig excludedServicesConfig = null, Azure.ResourceManager.HDInsight.Models.HDInsightClusterNetworkProperties networkProperties = null, Azure.ResourceManager.HDInsight.Models.HDInsightComputeIsolationProperties computeIsolationProperties = null, System.Collections.Generic.IEnumerable privateLinkConfigurations = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterValidationErrorInfo HDInsightClusterValidationErrorInfo(string code = null, string message = null, string errorResource = null, System.Collections.Generic.IEnumerable messageArguments = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightDiskBillingMeters HDInsightDiskBillingMeters(string diskRpMeter = null, string sku = null, Azure.ResourceManager.HDInsight.Models.HDInsightTier? tier = default(Azure.ResourceManager.HDInsight.Models.HDInsightTier?)) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightIPConfiguration HDInsightIPConfiguration(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState? provisioningState = default(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState?), bool? isPrimary = default(bool?), System.Net.IPAddress privateIPAddress = null, Azure.ResourceManager.HDInsight.Models.HDInsightPrivateIPAllocationMethod? privateIPAllocationMethod = default(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateIPAllocationMethod?), Azure.Core.ResourceIdentifier subnetId = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightLocalizedName HDInsightLocalizedName(string value = null, string localizedValue = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightNameAvailabilityResult HDInsightNameAvailabilityResult(bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } + public static Azure.ResourceManager.HDInsight.HDInsightPrivateEndpointConnectionData HDInsightPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkServiceConnectionState connectionState = null, string linkIdentifier = null, Azure.ResourceManager.HDInsight.Models.HDInsightPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateEndpointConnectionProvisioningState?)) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfiguration HDInsightPrivateLinkConfiguration(string id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), string groupId = null, Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState? provisioningState = default(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState?), System.Collections.Generic.IEnumerable ipConfigurations = null) { throw null; } + public static Azure.ResourceManager.HDInsight.HDInsightPrivateLinkResourceData HDInsightPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightUsage HDInsightUsage(string unit = null, long? currentValue = default(long?), long? limit = default(long?), Azure.ResourceManager.HDInsight.Models.HDInsightLocalizedName name = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightVersionsCapability HDInsightVersionsCapability(System.Collections.Generic.IEnumerable available = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightVersionSpec HDInsightVersionSpec(string friendlyName = null, string displayName = null, bool? isDefault = default(bool?), System.Collections.Generic.IReadOnlyDictionary componentVersions = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightVmSizeCompatibilityFilterV2 HDInsightVmSizeCompatibilityFilterV2(Azure.ResourceManager.HDInsight.Models.HDInsightFilterMode? filterMode = default(Azure.ResourceManager.HDInsight.Models.HDInsightFilterMode?), System.Collections.Generic.IEnumerable regions = null, System.Collections.Generic.IEnumerable clusterFlavors = null, System.Collections.Generic.IEnumerable nodeTypes = null, System.Collections.Generic.IEnumerable clusterVersions = null, System.Collections.Generic.IEnumerable osType = null, System.Collections.Generic.IEnumerable vmSizes = null, string espApplied = null, string isComputeIsolationSupported = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightVmSizeProperty HDInsightVmSizeProperty(string name = null, int? cores = default(int?), string dataDiskStorageTier = null, string label = null, long? maxDataDiskCount = default(long?), long? memoryInMB = default(long?), bool? isSupportedByVirtualMachines = default(bool?), bool? isSupportedByWebWorkerRoles = default(bool?), long? virtualMachineResourceDiskSizeInMB = default(long?), long? webWorkerResourceDiskSizeInMB = default(long?)) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.QuotaCapability QuotaCapability(long? coresUsed = default(long?), long? maxCoresAllowed = default(long?), System.Collections.Generic.IEnumerable regionalQuotas = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.RegionalQuotaCapability RegionalQuotaCapability(Azure.Core.AzureLocation? region = default(Azure.Core.AzureLocation?), long? coresUsed = default(long?), long? coresAvailable = default(long?)) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.RegionsCapability RegionsCapability(System.Collections.Generic.IEnumerable available = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.RuntimeScriptAction RuntimeScriptAction(string name = null, System.Uri uri = null, string parameters = null, System.Collections.Generic.IEnumerable roles = null, string applicationName = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.RuntimeScriptActionDetail RuntimeScriptActionDetail(string name = null, System.Uri uri = null, string parameters = null, System.Collections.Generic.IEnumerable roles = null, string applicationName = null, long? scriptExecutionId = default(long?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string status = null, string operation = null, System.Collections.Generic.IEnumerable executionSummary = null, string debugInformation = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ScriptActionExecutionSummary ScriptActionExecutionSummary(string status = null, int? instanceCount = default(int?)) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AuthenticationDirectoryType : System.IEquatable { diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/ArmHDInsightModelFactory.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/ArmHDInsightModelFactory.cs new file mode 100644 index 0000000000000..71aaa5d2beb47 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/ArmHDInsightModelFactory.cs @@ -0,0 +1,537 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using Azure; +using Azure.Core; +using Azure.ResourceManager.HDInsight; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Model factory for models. + public static partial class ArmHDInsightModelFactory + { + /// Initializes a new instance of HDInsightClusterDataDiskGroup. + /// The number of disks per node. + /// ReadOnly. The storage account type. Do not set this value. + /// ReadOnly. The DiskSize in GB. Do not set this value. + /// A new instance for mocking. + public static HDInsightClusterDataDiskGroup HDInsightClusterDataDiskGroup(int? disksPerNode = null, string storageAccountType = null, int? diskSizeInGB = null) + { + return new HDInsightClusterDataDiskGroup(disksPerNode, storageAccountType, diskSizeInGB); + } + + /// Initializes a new instance of HDInsightPrivateLinkConfiguration. + /// The private link configuration id. + /// The name of private link configuration. + /// The type of the private link configuration. + /// The HDInsight private linkable sub-resource name to apply the private link configuration to. For example, 'headnode', 'gateway', 'edgenode'. + /// The private link configuration provisioning state, which only appears in the response. + /// The IP configurations for the private link service. + /// A new instance for mocking. + public static HDInsightPrivateLinkConfiguration HDInsightPrivateLinkConfiguration(string id = null, string name = null, ResourceType? resourceType = null, string groupId = null, HDInsightPrivateLinkConfigurationProvisioningState? provisioningState = null, IEnumerable ipConfigurations = null) + { + ipConfigurations ??= new List(); + + return new HDInsightPrivateLinkConfiguration(id, name, resourceType, groupId, provisioningState, ipConfigurations?.ToList()); + } + + /// Initializes a new instance of HDInsightIPConfiguration. + /// The private link IP configuration id. + /// The name of private link IP configuration. + /// The type of the private link IP configuration. + /// The private link configuration provisioning state, which only appears in the response. + /// Indicates whether this IP configuration is primary for the corresponding NIC. + /// The IP address. + /// The method that private IP address is allocated. + /// The subnet resource id. + /// A new instance for mocking. + public static HDInsightIPConfiguration HDInsightIPConfiguration(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, HDInsightPrivateLinkConfigurationProvisioningState? provisioningState = null, bool? isPrimary = null, IPAddress privateIPAddress = null, HDInsightPrivateIPAllocationMethod? privateIPAllocationMethod = null, ResourceIdentifier subnetId = null) + { + return new HDInsightIPConfiguration(id, name, resourceType, provisioningState, isPrimary, privateIPAddress, privateIPAllocationMethod, subnetId != null ? ResourceManagerModelFactory.WritableSubResource(subnetId) : null); + } + + /// Initializes a new instance of HDInsightClusterData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The ETag for the resource. + /// The availability zones. + /// The properties of the cluster. + /// The identity of the cluster, if configured. + /// A new instance for mocking. + public static HDInsightClusterData HDInsightClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, IEnumerable zones = null, HDInsightClusterProperties properties = null, ManagedServiceIdentity identity = null) + { + tags ??= new Dictionary(); + zones ??= new List(); + + return new HDInsightClusterData(id, name, resourceType, systemData, tags, location, etag, zones?.ToList(), properties, identity); + } + + /// Initializes a new instance of HDInsightClusterProperties. + /// The version of the cluster. + /// The hdp version of the cluster. + /// The type of operating system. + /// The cluster tier. + /// The cluster id. + /// The cluster definition. + /// The cluster kafka rest proxy configuration. + /// The security profile. + /// The compute profile. + /// The provisioning state, which only appears in the response. + /// The date on which the cluster was created. + /// The state of the cluster. + /// The quota information. + /// The list of errors. + /// The list of connectivity endpoints. + /// The disk encryption properties. + /// The encryption-in-transit properties. + /// The storage profile. + /// The minimal supported tls version. + /// The excluded services config. + /// The network properties. + /// The compute isolation properties. + /// The private link configurations. + /// The list of private endpoint connections. + /// A new instance for mocking. + public static HDInsightClusterProperties HDInsightClusterProperties(string clusterVersion = null, string clusterHdpVersion = null, HDInsightOSType? osType = null, HDInsightTier? tier = null, string clusterId = null, HDInsightClusterDefinition clusterDefinition = null, KafkaRestProperties kafkaRestProperties = null, HDInsightSecurityProfile securityProfile = null, IEnumerable computeRoles = null, HDInsightClusterProvisioningState? provisioningState = null, DateTimeOffset? createdOn = null, string clusterState = null, int? quotaInfoCoresUsed = null, IEnumerable errors = null, IEnumerable connectivityEndpoints = null, HDInsightDiskEncryptionProperties diskEncryptionProperties = null, bool? isEncryptionInTransitEnabled = null, IEnumerable storageAccounts = null, string minSupportedTlsVersion = null, ExcludedServicesConfig excludedServicesConfig = null, HDInsightClusterNetworkProperties networkProperties = null, HDInsightComputeIsolationProperties computeIsolationProperties = null, IEnumerable privateLinkConfigurations = null, IEnumerable privateEndpointConnections = null) + { + computeRoles ??= new List(); + errors ??= new List(); + connectivityEndpoints ??= new List(); + storageAccounts ??= new List(); + privateLinkConfigurations ??= new List(); + privateEndpointConnections ??= new List(); + + return new HDInsightClusterProperties(clusterVersion, clusterHdpVersion, osType, tier, clusterId, clusterDefinition, kafkaRestProperties, securityProfile, computeRoles != null ? new ComputeProfile(computeRoles?.ToList()) : null, provisioningState, createdOn, clusterState, quotaInfoCoresUsed != null ? new QuotaInfo(quotaInfoCoresUsed) : null, errors?.ToList(), connectivityEndpoints?.ToList(), diskEncryptionProperties, isEncryptionInTransitEnabled != null ? new EncryptionInTransitProperties(isEncryptionInTransitEnabled) : null, storageAccounts != null ? new StorageProfile(storageAccounts?.ToList()) : null, minSupportedTlsVersion, excludedServicesConfig, networkProperties, computeIsolationProperties, privateLinkConfigurations?.ToList(), privateEndpointConnections?.ToList()); + } + + /// Initializes a new instance of HDInsightPrivateEndpointConnectionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The private endpoint of the private endpoint connection. + /// The private link service connection state. + /// The link identifier. + /// The provisioning state, which only appears in the response. + /// A new instance for mocking. + public static HDInsightPrivateEndpointConnectionData HDInsightPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier privateEndpointId = null, HDInsightPrivateLinkServiceConnectionState connectionState = null, string linkIdentifier = null, HDInsightPrivateEndpointConnectionProvisioningState? provisioningState = null) + { + return new HDInsightPrivateEndpointConnectionData(id, name, resourceType, systemData, privateEndpointId != null ? ResourceManagerModelFactory.SubResource(privateEndpointId) : null, connectionState, linkIdentifier, provisioningState); + } + + /// Initializes a new instance of HDInsightAsyncOperationResult. + /// The async operation state. + /// The operation error information. + /// A new instance for mocking. + public static HDInsightAsyncOperationResult HDInsightAsyncOperationResult(HDInsightAsyncOperationState? status = null, ResponseError error = null) + { + return new HDInsightAsyncOperationResult(status, error); + } + + /// Initializes a new instance of HDInsightApplicationData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The ETag for the application. + /// The tags for the application. + /// The properties of the application. + /// A new instance for mocking. + public static HDInsightApplicationData HDInsightApplicationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? etag = null, IDictionary tags = null, HDInsightApplicationProperties properties = null) + { + tags ??= new Dictionary(); + + return new HDInsightApplicationData(id, name, resourceType, systemData, etag, tags, properties); + } + + /// Initializes a new instance of HDInsightApplicationProperties. + /// The list of roles in the cluster. + /// The list of install script actions. + /// The list of uninstall script actions. + /// The list of application HTTPS endpoints. + /// The list of application SSH endpoints. + /// The provisioning state of the application. + /// The application type. + /// The application state. + /// The list of errors. + /// The application create date time. + /// The marketplace identifier. + /// The private link configurations. + /// A new instance for mocking. + public static HDInsightApplicationProperties HDInsightApplicationProperties(IEnumerable computeRoles = null, IEnumerable installScriptActions = null, IEnumerable uninstallScriptActions = null, IEnumerable httpsEndpoints = null, IEnumerable sshEndpoints = null, string provisioningState = null, string applicationType = null, string applicationState = null, IEnumerable errors = null, DateTimeOffset? createdOn = null, string marketplaceIdentifier = null, IEnumerable privateLinkConfigurations = null) + { + computeRoles ??= new List(); + installScriptActions ??= new List(); + uninstallScriptActions ??= new List(); + httpsEndpoints ??= new List(); + sshEndpoints ??= new List(); + errors ??= new List(); + privateLinkConfigurations ??= new List(); + + return new HDInsightApplicationProperties(computeRoles != null ? new ComputeProfile(computeRoles?.ToList()) : null, installScriptActions?.ToList(), uninstallScriptActions?.ToList(), httpsEndpoints?.ToList(), sshEndpoints?.ToList(), provisioningState, applicationType, applicationState, errors?.ToList(), createdOn, marketplaceIdentifier, privateLinkConfigurations?.ToList()); + } + + /// Initializes a new instance of RuntimeScriptAction. + /// The name of the script action. + /// The URI to the script. + /// The parameters for the script. + /// The list of roles where script will be executed. + /// The application name of the script action, if any. + /// A new instance for mocking. + public static RuntimeScriptAction RuntimeScriptAction(string name = null, Uri uri = null, string parameters = null, IEnumerable roles = null, string applicationName = null) + { + roles ??= new List(); + + return new RuntimeScriptAction(name, uri, parameters, roles?.ToList(), applicationName); + } + + /// Initializes a new instance of HDInsightApplicationHttpsEndpoint. + /// The list of access modes for the application. + /// The location of the endpoint. + /// The destination port to connect to. + /// The public port to connect to. + /// The private ip address of the endpoint. + /// The subdomain suffix of the application. + /// The value indicates whether to disable GatewayAuth. + /// A new instance for mocking. + public static HDInsightApplicationHttpsEndpoint HDInsightApplicationHttpsEndpoint(IEnumerable accessModes = null, string endpointLocation = null, int? destinationPort = null, int? publicPort = null, IPAddress privateIPAddress = null, string subDomainSuffix = null, bool? disableGatewayAuth = null) + { + accessModes ??= new List(); + + return new HDInsightApplicationHttpsEndpoint(accessModes?.ToList(), endpointLocation, destinationPort, publicPort, privateIPAddress, subDomainSuffix, disableGatewayAuth); + } + + /// Initializes a new instance of HDInsightCapabilitiesResult. + /// The version capability. + /// The virtual machine size compatibility features. + /// The capability features. + /// The quota capability. + /// A new instance for mocking. + public static HDInsightCapabilitiesResult HDInsightCapabilitiesResult(IReadOnlyDictionary versions = null, IReadOnlyDictionary regions = null, IEnumerable features = null, QuotaCapability quota = null) + { + versions ??= new Dictionary(); + regions ??= new Dictionary(); + features ??= new List(); + + return new HDInsightCapabilitiesResult(versions, regions, features?.ToList(), quota); + } + + /// Initializes a new instance of HDInsightVersionsCapability. + /// The list of version capabilities. + /// A new instance for mocking. + public static HDInsightVersionsCapability HDInsightVersionsCapability(IEnumerable available = null) + { + available ??= new List(); + + return new HDInsightVersionsCapability(available?.ToList()); + } + + /// Initializes a new instance of HDInsightVersionSpec. + /// The friendly name. + /// The display name. + /// Whether or not the version is the default version. + /// The component version property. + /// A new instance for mocking. + public static HDInsightVersionSpec HDInsightVersionSpec(string friendlyName = null, string displayName = null, bool? isDefault = null, IReadOnlyDictionary componentVersions = null) + { + componentVersions ??= new Dictionary(); + + return new HDInsightVersionSpec(friendlyName, displayName, isDefault, componentVersions); + } + + /// Initializes a new instance of RegionsCapability. + /// The list of region capabilities. + /// A new instance for mocking. + public static RegionsCapability RegionsCapability(IEnumerable available = null) + { + available ??= new List(); + + return new RegionsCapability(available?.ToList()); + } + + /// Initializes a new instance of QuotaCapability. + /// The number of cores used in the subscription. + /// The number of cores that the subscription allowed. + /// The list of region quota capabilities. + /// A new instance for mocking. + public static QuotaCapability QuotaCapability(long? coresUsed = null, long? maxCoresAllowed = null, IEnumerable regionalQuotas = null) + { + regionalQuotas ??= new List(); + + return new QuotaCapability(coresUsed, maxCoresAllowed, regionalQuotas?.ToList()); + } + + /// Initializes a new instance of RegionalQuotaCapability. + /// The region name. + /// The number of cores used in the region. + /// The number of cores available in the region. + /// A new instance for mocking. + public static RegionalQuotaCapability RegionalQuotaCapability(AzureLocation? region = null, long? coresUsed = null, long? coresAvailable = null) + { + return new RegionalQuotaCapability(region, coresUsed, coresAvailable); + } + + /// Initializes a new instance of HDInsightUsage. + /// The type of measurement for usage. + /// The current usage. + /// The maximum allowed usage. + /// The details about the localizable name of the used resource. + /// A new instance for mocking. + public static HDInsightUsage HDInsightUsage(string unit = null, long? currentValue = null, long? limit = null, HDInsightLocalizedName name = null) + { + return new HDInsightUsage(unit, currentValue, limit, name); + } + + /// Initializes a new instance of HDInsightLocalizedName. + /// The name of the used resource. + /// The localized name of the used resource. + /// A new instance for mocking. + public static HDInsightLocalizedName HDInsightLocalizedName(string value = null, string localizedValue = null) + { + return new HDInsightLocalizedName(value, localizedValue); + } + + /// Initializes a new instance of HDInsightBillingSpecsListResult. + /// The virtual machine sizes to include or exclude. + /// The vm sizes which enable encryption at host. + /// The virtual machine filtering mode. Effectively this can enabling or disabling the virtual machine sizes in a particular set. + /// The vm size properties. + /// The billing and managed disk billing resources for a region. + /// A new instance for mocking. + public static HDInsightBillingSpecsListResult HDInsightBillingSpecsListResult(IEnumerable vmSizes = null, IEnumerable vmSizesWithEncryptionAtHost = null, IEnumerable vmSizeFilters = null, IEnumerable vmSizeProperties = null, IEnumerable billingResources = null) + { + vmSizes ??= new List(); + vmSizesWithEncryptionAtHost ??= new List(); + vmSizeFilters ??= new List(); + vmSizeProperties ??= new List(); + billingResources ??= new List(); + + return new HDInsightBillingSpecsListResult(vmSizes?.ToList(), vmSizesWithEncryptionAtHost?.ToList(), vmSizeFilters?.ToList(), vmSizeProperties?.ToList(), billingResources?.ToList()); + } + + /// Initializes a new instance of HDInsightVmSizeCompatibilityFilterV2. + /// The filtering mode. Effectively this can enabling or disabling the VM sizes in a particular set. + /// The list of regions under the effect of the filter. + /// The list of cluster flavors under the effect of the filter. + /// The list of node types affected by the filter. + /// The list of cluster versions affected in Major.Minor format. + /// The OSType affected, Windows or Linux. + /// The list of virtual machine sizes to include or exclude. + /// Whether apply for ESP cluster. 'true' means only for ESP, 'false' means only for non-ESP, null or empty string or others mean for both. + /// Whether support compute isolation. 'true' means only for ComputeIsolationEnabled, 'false' means only for regular cluster. + /// A new instance for mocking. + public static HDInsightVmSizeCompatibilityFilterV2 HDInsightVmSizeCompatibilityFilterV2(HDInsightFilterMode? filterMode = null, IEnumerable regions = null, IEnumerable clusterFlavors = null, IEnumerable nodeTypes = null, IEnumerable clusterVersions = null, IEnumerable osType = null, IEnumerable vmSizes = null, string espApplied = null, string isComputeIsolationSupported = null) + { + regions ??= new List(); + clusterFlavors ??= new List(); + nodeTypes ??= new List(); + clusterVersions ??= new List(); + osType ??= new List(); + vmSizes ??= new List(); + + return new HDInsightVmSizeCompatibilityFilterV2(filterMode, regions?.ToList(), clusterFlavors?.ToList(), nodeTypes?.ToList(), clusterVersions?.ToList(), osType?.ToList(), vmSizes?.ToList(), espApplied, isComputeIsolationSupported); + } + + /// Initializes a new instance of HDInsightVmSizeProperty. + /// The vm size name. + /// The number of cores that the vm size has. + /// The data disk storage tier of the vm size. + /// The label of the vm size. + /// The max data disk count of the vm size. + /// The memory whose unit is MB of the vm size. + /// This indicates this vm size is supported by virtual machines or not. + /// The indicates this vm size is supported by web worker roles or not. + /// The virtual machine resource disk size whose unit is MB of the vm size. + /// The web worker resource disk size whose unit is MB of the vm size. + /// A new instance for mocking. + public static HDInsightVmSizeProperty HDInsightVmSizeProperty(string name = null, int? cores = null, string dataDiskStorageTier = null, string label = null, long? maxDataDiskCount = null, long? memoryInMB = null, bool? isSupportedByVirtualMachines = null, bool? isSupportedByWebWorkerRoles = null, long? virtualMachineResourceDiskSizeInMB = null, long? webWorkerResourceDiskSizeInMB = null) + { + return new HDInsightVmSizeProperty(name, cores, dataDiskStorageTier, label, maxDataDiskCount, memoryInMB, isSupportedByVirtualMachines, isSupportedByWebWorkerRoles, virtualMachineResourceDiskSizeInMB, webWorkerResourceDiskSizeInMB); + } + + /// Initializes a new instance of HDInsightBillingResources. + /// The region or location. + /// The billing meter information. + /// The managed disk billing information. + /// A new instance for mocking. + public static HDInsightBillingResources HDInsightBillingResources(AzureLocation? region = null, IEnumerable billingMeters = null, IEnumerable diskBillingMeters = null) + { + billingMeters ??= new List(); + diskBillingMeters ??= new List(); + + return new HDInsightBillingResources(region, billingMeters?.ToList(), diskBillingMeters?.ToList()); + } + + /// Initializes a new instance of HDInsightBillingMeters. + /// The virtual machine sizes. + /// The HDInsight meter guid. + /// The unit of meter, VMHours or CoreHours. + /// A new instance for mocking. + public static HDInsightBillingMeters HDInsightBillingMeters(string meterParameter = null, string meter = null, string unit = null) + { + return new HDInsightBillingMeters(meterParameter, meter, unit); + } + + /// Initializes a new instance of HDInsightDiskBillingMeters. + /// The managed disk meter guid. + /// The managed disk billing sku, P30 or S30. + /// The managed disk billing tier, Standard or Premium. + /// A new instance for mocking. + public static HDInsightDiskBillingMeters HDInsightDiskBillingMeters(string diskRpMeter = null, string sku = null, HDInsightTier? tier = null) + { + return new HDInsightDiskBillingMeters(diskRpMeter, sku, tier); + } + + /// Initializes a new instance of HDInsightNameAvailabilityResult. + /// This indicates whether the name is available. + /// The reason of the result. + /// The related message. + /// A new instance for mocking. + public static HDInsightNameAvailabilityResult HDInsightNameAvailabilityResult(bool? isNameAvailable = null, string reason = null, string message = null) + { + return new HDInsightNameAvailabilityResult(isNameAvailable, reason, message); + } + + /// Initializes a new instance of HDInsightClusterCreationValidateResult. + /// The validation errors. + /// The validation warnings. + /// The estimated creation duration. + /// The Azure active directory domain service resource details. + /// A new instance for mocking. + public static HDInsightClusterCreationValidateResult HDInsightClusterCreationValidateResult(IEnumerable validationErrors = null, IEnumerable validationWarnings = null, TimeSpan? estimatedCreationDuration = null, IEnumerable aaddsResourcesDetails = null) + { + validationErrors ??= new List(); + validationWarnings ??= new List(); + aaddsResourcesDetails ??= new List(); + + return new HDInsightClusterCreationValidateResult(validationErrors?.ToList(), validationWarnings?.ToList(), estimatedCreationDuration, aaddsResourcesDetails?.ToList()); + } + + /// Initializes a new instance of HDInsightClusterValidationErrorInfo. + /// The error code. + /// The error message. + /// The error resource. + /// The message arguments. + /// A new instance for mocking. + public static HDInsightClusterValidationErrorInfo HDInsightClusterValidationErrorInfo(string code = null, string message = null, string errorResource = null, IEnumerable messageArguments = null) + { + messageArguments ??= new List(); + + return new HDInsightClusterValidationErrorInfo(code, message, errorResource, messageArguments?.ToList()); + } + + /// Initializes a new instance of HDInsightClusterAaddsDetail. + /// The Azure active directory domain service name. + /// This indicates whether initial sync complete or not. + /// This indicates whether enable ldaps or not. + /// The base 64 format string of public ldap certificate. + /// The resource id of azure active directory domain service. + /// The subnet resource id. + /// The tenant id of azure active directory domain service . + /// A new instance for mocking. + public static HDInsightClusterAaddsDetail HDInsightClusterAaddsDetail(string domainName = null, bool? isInitialSyncComplete = null, bool? isLdapsEnabled = null, string ldapsPublicCertificateInBase64 = null, ResourceIdentifier resourceId = null, ResourceIdentifier subnetId = null, Guid? tenantId = null) + { + return new HDInsightClusterAaddsDetail(domainName, isInitialSyncComplete, isLdapsEnabled, ldapsPublicCertificateInBase64, resourceId, subnetId, tenantId); + } + + /// Initializes a new instance of HDInsightClusterConfigurations. + /// The configuration object for the specified configuration for the specified cluster. + /// A new instance for mocking. + public static HDInsightClusterConfigurations HDInsightClusterConfigurations(IReadOnlyDictionary> configurations = null) + { + configurations ??= new Dictionary>(); + + return new HDInsightClusterConfigurations(configurations); + } + + /// Initializes a new instance of HDInsightClusterExtensionStatus. + /// The status of the monitor on the HDInsight cluster. + /// The workspace ID of the monitor on the HDInsight cluster. + /// A new instance for mocking. + public static HDInsightClusterExtensionStatus HDInsightClusterExtensionStatus(bool? isClusterMonitoringEnabled = null, string workspaceId = null) + { + return new HDInsightClusterExtensionStatus(isClusterMonitoringEnabled, workspaceId); + } + + /// Initializes a new instance of HDInsightAzureMonitorExtensionStatus. + /// The status of the monitor on the HDInsight cluster. + /// The workspace ID of the monitor on the HDInsight cluster. + /// The selected configurations. + /// A new instance for mocking. + public static HDInsightAzureMonitorExtensionStatus HDInsightAzureMonitorExtensionStatus(bool? isClusterMonitoringEnabled = null, string workspaceId = null, HDInsightAzureMonitorSelectedConfigurations selectedConfigurations = null) + { + return new HDInsightAzureMonitorExtensionStatus(isClusterMonitoringEnabled, workspaceId, selectedConfigurations); + } + + /// Initializes a new instance of RuntimeScriptActionDetail. + /// The name of the script action. + /// The URI to the script. + /// The parameters for the script. + /// The list of roles where script will be executed. + /// The application name of the script action, if any. + /// The execution id of the script action. + /// The start time of script action execution. + /// The end time of script action execution. + /// The current execution status of the script action. + /// The reason why the script action was executed. + /// The summary of script action execution result. + /// The script action execution debug information. + /// A new instance for mocking. + public static RuntimeScriptActionDetail RuntimeScriptActionDetail(string name = null, Uri uri = null, string parameters = null, IEnumerable roles = null, string applicationName = null, long? scriptExecutionId = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string status = null, string operation = null, IEnumerable executionSummary = null, string debugInformation = null) + { + roles ??= new List(); + executionSummary ??= new List(); + + return new RuntimeScriptActionDetail(name, uri, parameters, roles?.ToList(), applicationName, scriptExecutionId, startOn, endOn, status, operation, executionSummary?.ToList(), debugInformation); + } + + /// Initializes a new instance of ScriptActionExecutionSummary. + /// The status of script action execution. + /// The instance count for a given script action execution status. + /// A new instance for mocking. + public static ScriptActionExecutionSummary ScriptActionExecutionSummary(string status = null, int? instanceCount = null) + { + return new ScriptActionExecutionSummary(status, instanceCount); + } + + /// Initializes a new instance of HDInsightClusterHostInfo. + /// The host name. + /// The Fully Qualified Domain Name of host. + /// The effective disk encryption key URL used by the host. + /// A new instance for mocking. + public static HDInsightClusterHostInfo HDInsightClusterHostInfo(string name = null, string fqdn = null, Uri effectiveDiskEncryptionKeyUri = null) + { + return new HDInsightClusterHostInfo(name, fqdn, effectiveDiskEncryptionKeyUri); + } + + /// Initializes a new instance of HDInsightPrivateLinkResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The private link resource group id. + /// The private link resource required member names. + /// The private link resource Private link DNS zone name. + /// A new instance for mocking. + public static HDInsightPrivateLinkResourceData HDInsightPrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null) + { + requiredMembers ??= new List(); + requiredZoneNames ??= new List(); + + return new HDInsightPrivateLinkResourceData(id, name, resourceType, systemData, groupId, requiredMembers?.ToList(), requiredZoneNames?.ToList()); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/autorest.md b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/autorest.md index 3ffe6d7ac35b3..b2a2e2e781507 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/autorest.md +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/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: HDInsight namespace: Azure.ResourceManager.HDInsight