diff --git a/sdk/devspaces/Azure.ResourceManager.DevSpaces/CHANGELOG.md b/sdk/devspaces/Azure.ResourceManager.DevSpaces/CHANGELOG.md index 3edef82b0aac..0d1dd11203c6 100644 --- a/sdk/devspaces/Azure.ResourceManager.DevSpaces/CHANGELOG.md +++ b/sdk/devspaces/Azure.ResourceManager.DevSpaces/CHANGELOG.md @@ -1,15 +1,16 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.3 (2023-05-29) ### 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.0-beta.2 (2023-02-16) ### Features Added diff --git a/sdk/devspaces/Azure.ResourceManager.DevSpaces/api/Azure.ResourceManager.DevSpaces.netstandard2.0.cs b/sdk/devspaces/Azure.ResourceManager.DevSpaces/api/Azure.ResourceManager.DevSpaces.netstandard2.0.cs index 8498e9edc2de..5a6fde71675a 100644 --- a/sdk/devspaces/Azure.ResourceManager.DevSpaces/api/Azure.ResourceManager.DevSpaces.netstandard2.0.cs +++ b/sdk/devspaces/Azure.ResourceManager.DevSpaces/api/Azure.ResourceManager.DevSpaces.netstandard2.0.cs @@ -62,6 +62,14 @@ public static partial class DevSpacesExtensions } namespace Azure.ResourceManager.DevSpaces.Models { + public static partial class ArmDevSpacesModelFactory + { + public static Azure.ResourceManager.DevSpaces.Models.ContainerHostMapping ContainerHostMapping(string containerHostResourceId = null, string mappedControllerResourceId = null) { throw null; } + public static Azure.ResourceManager.DevSpaces.Models.ControllerConnectionDetails ControllerConnectionDetails(Azure.ResourceManager.DevSpaces.Models.OrchestratorSpecificConnectionDetails orchestratorSpecificConnectionDetails = null) { throw null; } + public static Azure.ResourceManager.DevSpaces.Models.ControllerConnectionDetailsList ControllerConnectionDetailsList(System.Collections.Generic.IEnumerable connectionDetailsList = null) { throw null; } + public static Azure.ResourceManager.DevSpaces.ControllerData ControllerData(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.DevSpaces.Models.DevSpacesSku sku = null, Azure.ResourceManager.DevSpaces.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DevSpaces.Models.ProvisioningState?), string hostSuffix = null, string dataPlaneFqdn = null, string targetContainerHostApiServerFqdn = null, string targetContainerHostResourceId = null, string targetContainerHostCredentialsBase64 = null) { throw null; } + public static Azure.ResourceManager.DevSpaces.Models.KubernetesConnectionDetails KubernetesConnectionDetails(string kubeConfig = null) { throw null; } + } public partial class ContainerHostMapping { public ContainerHostMapping() { } diff --git a/sdk/devspaces/Azure.ResourceManager.DevSpaces/src/Generated/ArmDevSpacesModelFactory.cs b/sdk/devspaces/Azure.ResourceManager.DevSpaces/src/Generated/ArmDevSpacesModelFactory.cs new file mode 100644 index 000000000000..842b3df06a4b --- /dev/null +++ b/sdk/devspaces/Azure.ResourceManager.DevSpaces/src/Generated/ArmDevSpacesModelFactory.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.DevSpaces; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DevSpaces.Models +{ + /// Model factory for models. + public static partial class ArmDevSpacesModelFactory + { + /// Initializes a new instance of ContainerHostMapping. + /// ARM ID of the Container Host resource. + /// ARM ID of the mapped Controller resource. + /// A new instance for mocking. + public static ContainerHostMapping ContainerHostMapping(string containerHostResourceId = null, string mappedControllerResourceId = null) + { + return new ContainerHostMapping(containerHostResourceId, mappedControllerResourceId); + } + + /// Initializes a new instance of ControllerData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Model representing SKU for Azure Dev Spaces Controller. + /// Provisioning state of the Azure Dev Spaces Controller. + /// DNS suffix for public endpoints running in the Azure Dev Spaces Controller. + /// DNS name for accessing DataPlane services. + /// DNS of the target container host's API server. + /// Resource ID of the target container host. + /// Credentials of the target container host (base64). + /// A new instance for mocking. + public static ControllerData ControllerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DevSpacesSku sku = null, ProvisioningState? provisioningState = null, string hostSuffix = null, string dataPlaneFqdn = null, string targetContainerHostApiServerFqdn = null, string targetContainerHostResourceId = null, string targetContainerHostCredentialsBase64 = null) + { + tags ??= new Dictionary(); + + return new ControllerData(id, name, resourceType, systemData, tags, location, sku, provisioningState, hostSuffix, dataPlaneFqdn, targetContainerHostApiServerFqdn, targetContainerHostResourceId, targetContainerHostCredentialsBase64); + } + + /// Initializes a new instance of ControllerConnectionDetailsList. + /// List of Azure Dev Spaces Controller connection details. + /// A new instance for mocking. + public static ControllerConnectionDetailsList ControllerConnectionDetailsList(IEnumerable connectionDetailsList = null) + { + connectionDetailsList ??= new List(); + + return new ControllerConnectionDetailsList(connectionDetailsList?.ToList()); + } + + /// Initializes a new instance of ControllerConnectionDetails. + /// + /// Base class for types that supply values used to connect to container orchestrators + /// 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 . + /// + /// A new instance for mocking. + public static ControllerConnectionDetails ControllerConnectionDetails(OrchestratorSpecificConnectionDetails orchestratorSpecificConnectionDetails = null) + { + return new ControllerConnectionDetails(orchestratorSpecificConnectionDetails); + } + + /// Initializes a new instance of KubernetesConnectionDetails. + /// Gets the kubeconfig for the cluster. + /// A new instance for mocking. + public static KubernetesConnectionDetails KubernetesConnectionDetails(string kubeConfig = null) + { + return new KubernetesConnectionDetails("Kubernetes", kubeConfig); + } + } +} diff --git a/sdk/devspaces/Azure.ResourceManager.DevSpaces/src/autorest.md b/sdk/devspaces/Azure.ResourceManager.DevSpaces/src/autorest.md index 1f4a3c7cc121..a66eb5be3b5f 100644 --- a/sdk/devspaces/Azure.ResourceManager.DevSpaces/src/autorest.md +++ b/sdk/devspaces/Azure.ResourceManager.DevSpaces/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: DevSpaces namespace: Azure.ResourceManager.DevSpaces diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/CHANGELOG.md b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/CHANGELOG.md index 9bcde4be0eed..3a0e8aa45c54 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/CHANGELOG.md +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/CHANGELOG.md @@ -1,15 +1,16 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2023-05-29) ### 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/devtestlabs/Azure.ResourceManager.DevTestLabs/api/Azure.ResourceManager.DevTestLabs.netstandard2.0.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/api/Azure.ResourceManager.DevTestLabs.netstandard2.0.cs index 78f6c1bd868e..d498baf5b463 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/api/Azure.ResourceManager.DevTestLabs.netstandard2.0.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/api/Azure.ResourceManager.DevTestLabs.netstandard2.0.cs @@ -1112,6 +1112,45 @@ protected DevTestLabVmScheduleResource() { } } namespace Azure.ResourceManager.DevTestLabs.Models { + public static partial class ArmDevTestLabsModelFactory + { + public static Azure.ResourceManager.DevTestLabs.Models.ComputeDataDisk ComputeDataDisk(string name = null, System.Uri diskUri = null, string managedDiskId = null, int? diskSizeGiB = default(int?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.Models.ComputeVmInstanceViewStatus ComputeVmInstanceViewStatus(string code = null, string displayStatus = null, string message = null) { throw null; } + public static Azure.ResourceManager.DevTestLabs.Models.ComputeVmProperties ComputeVmProperties(System.Collections.Generic.IEnumerable statuses = null, string osType = null, string vmSize = null, string networkInterfaceId = null, string osDiskId = null, System.Collections.Generic.IEnumerable dataDiskIds = null, System.Collections.Generic.IEnumerable dataDisks = null) { throw null; } + public static Azure.ResourceManager.DevTestLabs.Models.DevTestLabAnnouncement DevTestLabAnnouncement(string title = null, string markdown = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabEnableStatus? enabled = default(Azure.ResourceManager.DevTestLabs.Models.DevTestLabEnableStatus?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), bool? isExpired = default(bool?), string provisioningState = null, System.Guid? uniqueIdentifier = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.Models.DevTestLabApplicableSchedule DevTestLabApplicableSchedule(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.DevTestLabs.DevTestLabScheduleData labVmsShutdown = null, Azure.ResourceManager.DevTestLabs.DevTestLabScheduleData labVmsStartup = null) { throw null; } + public static Azure.ResourceManager.DevTestLabs.DevTestLabArmTemplateData DevTestLabArmTemplateData(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 displayName = null, string description = null, string publisher = null, string icon = null, System.BinaryData contents = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable parametersValueFilesInfo = null, bool? isEnabled = default(bool?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.Models.DevTestLabArmTemplateInfo DevTestLabArmTemplateInfo(System.BinaryData template = null, System.BinaryData parameters = null) { throw null; } + public static Azure.ResourceManager.DevTestLabs.DevTestLabArtifactData DevTestLabArtifactData(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 title = null, string description = null, string publisher = null, string filePath = null, string icon = null, string targetOSType = null, System.BinaryData parameters = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.Models.DevTestLabArtifactDeploymentStatus DevTestLabArtifactDeploymentStatus(string deploymentStatus = null, int? artifactsApplied = default(int?), int? totalArtifacts = default(int?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.DevTestLabArtifactSourceData DevTestLabArtifactSourceData(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 displayName = null, System.Uri uri = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabSourceControlType? sourceType = default(Azure.ResourceManager.DevTestLabs.Models.DevTestLabSourceControlType?), string folderPath = null, string armTemplateFolderPath = null, string branchRef = null, string securityToken = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabEnableStatus? status = default(Azure.ResourceManager.DevTestLabs.Models.DevTestLabEnableStatus?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string provisioningState = null, System.Guid? uniqueIdentifier = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.DevTestLabCostData DevTestLabCostData(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.DevTestLabs.Models.DevTestLabTargetCost targetCost = null, double? estimatedLabCost = default(double?), System.Collections.Generic.IEnumerable labCostDetails = null, System.Collections.Generic.IEnumerable resourceCosts = null, string currencyCode = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string provisioningState = null, System.Guid? uniqueIdentifier = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.Models.DevTestLabCostDetails DevTestLabCostDetails(System.DateTimeOffset? on = default(System.DateTimeOffset?), double? cost = default(double?), Azure.ResourceManager.DevTestLabs.Models.DevTestLabCostType? costType = default(Azure.ResourceManager.DevTestLabs.Models.DevTestLabCostType?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.DevTestLabCustomImageData DevTestLabCustomImageData(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.DevTestLabs.Models.DevTestLabCustomImageVm vm = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabCustomImageVhd vhd = null, string description = null, string author = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string managedImageId = null, string managedSnapshotId = null, System.Collections.Generic.IEnumerable dataDiskStorageInfo = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabCustomImagePlan customImagePlan = null, bool? isPlanAuthorized = default(bool?), string provisioningState = null, System.Guid? uniqueIdentifier = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.DevTestLabData DevTestLabData(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 defaultStorageAccount = null, string defaultPremiumStorageAccount = null, string artifactsStorageAccount = null, string premiumDataDiskStorageAccount = null, string vaultName = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabStorageType? labStorageType = default(Azure.ResourceManager.DevTestLabs.Models.DevTestLabStorageType?), System.Collections.Generic.IEnumerable mandatoryArtifactsResourceIdsLinux = null, System.Collections.Generic.IEnumerable mandatoryArtifactsResourceIdsWindows = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.DevTestLabs.Models.DevTestLabPremiumDataDisk? premiumDataDisks = default(Azure.ResourceManager.DevTestLabs.Models.DevTestLabPremiumDataDisk?), Azure.ResourceManager.DevTestLabs.Models.DevTestLabEnvironmentPermission? environmentPermission = default(Azure.ResourceManager.DevTestLabs.Models.DevTestLabEnvironmentPermission?), Azure.ResourceManager.DevTestLabs.Models.DevTestLabAnnouncement announcement = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabSupport support = null, string vmCreationResourceGroup = null, string publicIPId = null, string loadBalancerId = null, string networkSecurityGroupId = null, System.Collections.Generic.IDictionary extendedProperties = null, string provisioningState = null, System.Guid? uniqueIdentifier = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.DevTestLabDiskData DevTestLabDiskData(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.DevTestLabs.Models.DevTestLabStorageType? diskType = default(Azure.ResourceManager.DevTestLabs.Models.DevTestLabStorageType?), int? diskSizeGiB = default(int?), Azure.Core.ResourceIdentifier leasedByLabVmId = null, string diskBlobName = null, System.Uri diskUri = null, string storageAccountId = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string hostCaching = null, Azure.Core.ResourceIdentifier managedDiskId = null, string provisioningState = null, System.Guid? uniqueIdentifier = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.DevTestLabEnvironmentData DevTestLabEnvironmentData(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.DevTestLabs.Models.DevTestLabEnvironmentDeployment deploymentProperties = null, string armTemplateDisplayName = null, string resourceGroupId = null, string createdByUser = null, string provisioningState = null, System.Guid? uniqueIdentifier = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.Models.DevTestLabEvaluatePoliciesResult DevTestLabEvaluatePoliciesResult(System.Collections.Generic.IEnumerable results = null) { throw null; } + public static Azure.ResourceManager.DevTestLabs.Models.DevTestLabExternalSubnet DevTestLabExternalSubnet(Azure.Core.ResourceIdentifier id = null, string name = null) { throw null; } + public static Azure.ResourceManager.DevTestLabs.DevTestLabFormulaData DevTestLabFormulaData(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 author = null, string osType = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.DevTestLabs.Models.DevTestLabVmCreationContent formulaContent = null, string labVmId = null, string provisioningState = null, System.Guid? uniqueIdentifier = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.Models.DevTestLabGalleryImage DevTestLabGalleryImage(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 author = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string description = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabGalleryImageReference imageReference = null, string icon = null, bool? isEnabled = default(bool?), string planId = null, bool? isPlanAuthorized = default(bool?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.Models.DevTestLabGenerateUploadUriResult DevTestLabGenerateUploadUriResult(System.Uri uploadUri = null) { throw null; } + public static Azure.ResourceManager.DevTestLabs.DevTestLabNotificationChannelData DevTestLabNotificationChannelData(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 webHookUri = null, string emailRecipient = null, string notificationLocale = null, string description = null, System.Collections.Generic.IEnumerable events = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string provisioningState = null, System.Guid? uniqueIdentifier = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.Models.DevTestLabParametersValueFileInfo DevTestLabParametersValueFileInfo(string fileName = null, System.BinaryData parametersValueInfo = null) { throw null; } + public static Azure.ResourceManager.DevTestLabs.DevTestLabPolicyData DevTestLabPolicyData(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.DevTestLabs.Models.DevTestLabPolicyStatus? status = default(Azure.ResourceManager.DevTestLabs.Models.DevTestLabPolicyStatus?), Azure.ResourceManager.DevTestLabs.Models.DevTestLabPolicyFactName? factName = default(Azure.ResourceManager.DevTestLabs.Models.DevTestLabPolicyFactName?), string factData = null, string threshold = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabPolicyEvaluatorType? evaluatorType = default(Azure.ResourceManager.DevTestLabs.Models.DevTestLabPolicyEvaluatorType?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string provisioningState = null, System.Guid? uniqueIdentifier = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.Models.DevTestLabPolicySetResult DevTestLabPolicySetResult(bool? hasError = default(bool?), System.Collections.Generic.IEnumerable policyViolations = null) { throw null; } + public static Azure.ResourceManager.DevTestLabs.Models.DevTestLabPolicyViolation DevTestLabPolicyViolation(string code = null, string message = null) { throw null; } + public static Azure.ResourceManager.DevTestLabs.Models.DevTestLabRdpConnection DevTestLabRdpConnection(string contents = null) { throw null; } + public static Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourceCost DevTestLabResourceCost(string resourceName = null, string resourceUniqueId = null, double? resourceCost = default(double?), string resourceType = null, string resourceOwner = null, string resourcePricingTier = null, string resourceStatus = null, string resourceId = null, string externalResourceId = null) { throw null; } + public static Azure.ResourceManager.DevTestLabs.Models.DevTestLabScheduleCreationParameter DevTestLabScheduleCreationParameter(string name = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabEnableStatus? status = default(Azure.ResourceManager.DevTestLabs.Models.DevTestLabEnableStatus?), string taskType = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabWeekDetails weeklyRecurrence = null, string dailyRecurrenceTime = null, int? hourlyRecurrenceMinute = default(int?), string timeZoneId = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabNotificationSettings notificationSettings = null, Azure.Core.ResourceIdentifier targetResourceId = null) { throw null; } + public static Azure.ResourceManager.DevTestLabs.DevTestLabScheduleData DevTestLabScheduleData(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.DevTestLabs.Models.DevTestLabEnableStatus? status = default(Azure.ResourceManager.DevTestLabs.Models.DevTestLabEnableStatus?), string taskType = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabWeekDetails weeklyRecurrence = null, string dailyRecurrenceTime = null, int? hourlyRecurrenceMinute = default(int?), string timeZoneId = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabNotificationSettings notificationSettings = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string targetResourceId = null, string provisioningState = null, System.Guid? uniqueIdentifier = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.DevTestLabSecretData DevTestLabSecretData(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 value = null, string provisioningState = null, System.Guid? uniqueIdentifier = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.DevTestLabServiceFabricData DevTestLabServiceFabricData(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 externalServiceFabricId = null, string environmentId = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabApplicableSchedule applicableSchedule = null, string provisioningState = null, System.Guid? uniqueIdentifier = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.DevTestLabServiceRunnerData DevTestLabServiceRunnerData(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.DevTestLabs.Models.DevTestLabManagedIdentity identity = null) { throw null; } + public static Azure.ResourceManager.DevTestLabs.DevTestLabUserData DevTestLabUserData(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.DevTestLabs.Models.DevTestLabUserIdentity identity = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabUserSecretStore secretStore = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string provisioningState = null, System.Guid? uniqueIdentifier = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.DevTestLabVirtualNetworkData DevTestLabVirtualNetworkData(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.Collections.Generic.IEnumerable allowedSubnets = null, string description = null, string externalProviderResourceId = null, System.Collections.Generic.IEnumerable externalSubnets = null, System.Collections.Generic.IEnumerable subnetOverrides = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string provisioningState = null, System.Guid? uniqueIdentifier = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DevTestLabs.DevTestLabVmData DevTestLabVmData(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 notes = null, string ownerObjectId = null, string ownerUserPrincipalName = null, string createdByUserId = null, string createdByUser = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier computeId = null, string customImageId = null, string osType = null, string size = null, string userName = null, string password = null, string sshKey = null, bool? isAuthenticationWithSshKey = default(bool?), string fqdn = null, string labSubnetName = null, Azure.Core.ResourceIdentifier labVirtualNetworkId = null, bool? disallowPublicIPAddress = default(bool?), System.Collections.Generic.IEnumerable artifacts = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabArtifactDeploymentStatus artifactDeploymentStatus = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabGalleryImageReference galleryImageReference = null, string planId = null, Azure.ResourceManager.DevTestLabs.Models.ComputeVmProperties computeVm = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabNetworkInterface networkInterface = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabApplicableSchedule applicableSchedule = null, System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), bool? allowClaim = default(bool?), string storageType = null, Azure.ResourceManager.DevTestLabs.Models.DevTestLabVmCreationSource? vmCreationSource = default(Azure.ResourceManager.DevTestLabs.Models.DevTestLabVmCreationSource?), Azure.Core.ResourceIdentifier environmentId = null, System.Collections.Generic.IEnumerable dataDiskParameters = null, System.Collections.Generic.IEnumerable scheduleParameters = null, string lastKnownPowerState = null, string provisioningState = null, System.Guid? uniqueIdentifier = default(System.Guid?)) { throw null; } + } public partial class AttachNewDataDiskDetails { public AttachNewDataDiskDetails() { } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/ArmDevTestLabsModelFactory.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/ArmDevTestLabsModelFactory.cs new file mode 100644 index 000000000000..7d00e1926334 --- /dev/null +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/ArmDevTestLabsModelFactory.cs @@ -0,0 +1,709 @@ +// 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.DevTestLabs; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DevTestLabs.Models +{ + /// Model factory for models. + public static partial class ArmDevTestLabsModelFactory + { + /// Initializes a new instance of DevTestLabData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The lab's default storage account. + /// The lab's default premium storage account. + /// The lab's artifact storage account. + /// The lab's premium data disk storage account. + /// The lab's Key vault. + /// Type of storage used by the lab. It can be either Premium or Standard. Default is Premium. + /// The ordered list of artifact resource IDs that should be applied on all Linux VM creations by default, prior to the artifacts specified by the user. + /// The ordered list of artifact resource IDs that should be applied on all Windows VM creations by default, prior to the artifacts specified by the user. + /// The creation date of the lab. + /// + /// The setting to enable usage of premium data disks. + /// When its value is 'Enabled', creation of standard or premium data disks is allowed. + /// When its value is 'Disabled', only creation of standard data disks is allowed. + /// + /// The access rights to be granted to the user when provisioning an environment. + /// The properties of any lab announcement associated with this lab. + /// The properties of any lab support message associated with this lab. + /// The resource group in which all new lab virtual machines will be created. To let DevTest Labs manage resource group creation, set this value to null. + /// The public IP address for the lab's load balancer. + /// The load balancer used to for lab VMs that use shared IP address. + /// The Network Security Group attached to the lab VMs Network interfaces to restrict open ports. + /// Extended properties of the lab used for experimental features. + /// The provisioning status of the resource. + /// The unique immutable identifier of a resource (Guid). + /// A new instance for mocking. + public static DevTestLabData DevTestLabData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string defaultStorageAccount = null, string defaultPremiumStorageAccount = null, string artifactsStorageAccount = null, string premiumDataDiskStorageAccount = null, string vaultName = null, DevTestLabStorageType? labStorageType = null, IEnumerable mandatoryArtifactsResourceIdsLinux = null, IEnumerable mandatoryArtifactsResourceIdsWindows = null, DateTimeOffset? createdOn = null, DevTestLabPremiumDataDisk? premiumDataDisks = null, DevTestLabEnvironmentPermission? environmentPermission = null, DevTestLabAnnouncement announcement = null, DevTestLabSupport support = null, string vmCreationResourceGroup = null, string publicIPId = null, string loadBalancerId = null, string networkSecurityGroupId = null, IDictionary extendedProperties = null, string provisioningState = null, Guid? uniqueIdentifier = null) + { + tags ??= new Dictionary(); + mandatoryArtifactsResourceIdsLinux ??= new List(); + mandatoryArtifactsResourceIdsWindows ??= new List(); + extendedProperties ??= new Dictionary(); + + return new DevTestLabData(id, name, resourceType, systemData, tags, location, defaultStorageAccount, defaultPremiumStorageAccount, artifactsStorageAccount, premiumDataDiskStorageAccount, vaultName, labStorageType, mandatoryArtifactsResourceIdsLinux?.ToList(), mandatoryArtifactsResourceIdsWindows?.ToList(), createdOn, premiumDataDisks, environmentPermission, announcement, support, vmCreationResourceGroup, publicIPId, loadBalancerId, networkSecurityGroupId, extendedProperties, provisioningState, uniqueIdentifier); + } + + /// Initializes a new instance of DevTestLabAnnouncement. + /// The plain text title for the lab announcement. + /// The markdown text (if any) that this lab displays in the UI. If left empty/null, nothing will be shown. + /// Is the lab announcement active/enabled at this time?. + /// The time at which the announcement expires (null for never). + /// Has this announcement expired?. + /// The provisioning status of the resource. + /// The unique immutable identifier of a resource (Guid). + /// A new instance for mocking. + public static DevTestLabAnnouncement DevTestLabAnnouncement(string title = null, string markdown = null, DevTestLabEnableStatus? enabled = null, DateTimeOffset? expireOn = null, bool? isExpired = null, string provisioningState = null, Guid? uniqueIdentifier = null) + { + return new DevTestLabAnnouncement(title, markdown, enabled, expireOn, isExpired, provisioningState, uniqueIdentifier); + } + + /// Initializes a new instance of DevTestLabScheduleData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The status of the schedule (i.e. Enabled, Disabled). + /// The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + /// If the schedule will occur only some days of the week, specify the weekly recurrence. + /// If the schedule will occur once each day of the week, specify the daily recurrence. + /// If the schedule will occur multiple times a day, specify the hourly recurrence. + /// The time zone ID (e.g. Pacific Standard time). + /// Notification settings. + /// The creation date of the schedule. + /// The resource ID to which the schedule belongs. + /// The provisioning status of the resource. + /// The unique immutable identifier of a resource (Guid). + /// A new instance for mocking. + public static DevTestLabScheduleData DevTestLabScheduleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DevTestLabEnableStatus? status = null, string taskType = null, DevTestLabWeekDetails weeklyRecurrence = null, string dailyRecurrenceTime = null, int? hourlyRecurrenceMinute = null, string timeZoneId = null, DevTestLabNotificationSettings notificationSettings = null, DateTimeOffset? createdOn = null, string targetResourceId = null, string provisioningState = null, Guid? uniqueIdentifier = null) + { + tags ??= new Dictionary(); + + return new DevTestLabScheduleData(id, name, resourceType, systemData, tags, location, status, taskType, weeklyRecurrence, dailyRecurrenceTime != null ? new DayDetails(dailyRecurrenceTime) : null, hourlyRecurrenceMinute != null ? new HourDetails(hourlyRecurrenceMinute) : null, timeZoneId, notificationSettings, createdOn, targetResourceId, provisioningState, uniqueIdentifier); + } + + /// Initializes a new instance of DevTestLabArtifactSourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The artifact source's display name. + /// The artifact source's URI. + /// The artifact source's type. + /// The folder containing artifacts. + /// The folder containing Azure Resource Manager templates. + /// The artifact source's branch reference. + /// The security token to authenticate to the artifact source. + /// Indicates if the artifact source is enabled (values: Enabled, Disabled). + /// The artifact source's creation date. + /// The provisioning status of the resource. + /// The unique immutable identifier of a resource (Guid). + /// A new instance for mocking. + public static DevTestLabArtifactSourceData DevTestLabArtifactSourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string displayName = null, Uri uri = null, DevTestLabSourceControlType? sourceType = null, string folderPath = null, string armTemplateFolderPath = null, string branchRef = null, string securityToken = null, DevTestLabEnableStatus? status = null, DateTimeOffset? createdOn = null, string provisioningState = null, Guid? uniqueIdentifier = null) + { + tags ??= new Dictionary(); + + return new DevTestLabArtifactSourceData(id, name, resourceType, systemData, tags, location, displayName, uri, sourceType, folderPath, armTemplateFolderPath, branchRef, securityToken, status, createdOn, provisioningState, uniqueIdentifier); + } + + /// Initializes a new instance of DevTestLabArmTemplateData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The display name of the ARM template. + /// The description of the ARM template. + /// The publisher of the ARM template. + /// The URI to the icon of the ARM template. + /// The contents of the ARM template. + /// The creation date of the armTemplate. + /// File name and parameter values information from all azuredeploy.*.parameters.json for the ARM template. + /// Whether or not ARM template is enabled for use by lab user. + /// A new instance for mocking. + public static DevTestLabArmTemplateData DevTestLabArmTemplateData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string displayName = null, string description = null, string publisher = null, string icon = null, BinaryData contents = null, DateTimeOffset? createdOn = null, IEnumerable parametersValueFilesInfo = null, bool? isEnabled = null) + { + tags ??= new Dictionary(); + parametersValueFilesInfo ??= new List(); + + return new DevTestLabArmTemplateData(id, name, resourceType, systemData, tags, location, displayName, description, publisher, icon, contents, createdOn, parametersValueFilesInfo?.ToList(), isEnabled); + } + + /// Initializes a new instance of DevTestLabParametersValueFileInfo. + /// File name. + /// Contents of the file. + /// A new instance for mocking. + public static DevTestLabParametersValueFileInfo DevTestLabParametersValueFileInfo(string fileName = null, BinaryData parametersValueInfo = null) + { + return new DevTestLabParametersValueFileInfo(fileName, parametersValueInfo); + } + + /// Initializes a new instance of DevTestLabArtifactData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The artifact's title. + /// The artifact's description. + /// The artifact's publisher. + /// The file path to the artifact. + /// The URI to the artifact icon. + /// The artifact's target OS. + /// The artifact's parameters. + /// The artifact's creation date. + /// A new instance for mocking. + public static DevTestLabArtifactData DevTestLabArtifactData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string title = null, string description = null, string publisher = null, string filePath = null, string icon = null, string targetOSType = null, BinaryData parameters = null, DateTimeOffset? createdOn = null) + { + tags ??= new Dictionary(); + + return new DevTestLabArtifactData(id, name, resourceType, systemData, tags, location, title, description, publisher, filePath, icon, targetOSType, parameters, createdOn); + } + + /// Initializes a new instance of DevTestLabArmTemplateInfo. + /// The template's contents. + /// The parameters of the ARM template. + /// A new instance for mocking. + public static DevTestLabArmTemplateInfo DevTestLabArmTemplateInfo(BinaryData template = null, BinaryData parameters = null) + { + return new DevTestLabArmTemplateInfo(template, parameters); + } + + /// Initializes a new instance of DevTestLabCostData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The target cost properties. + /// The lab cost summary component of the cost data. + /// The lab cost details component of the cost data. + /// The resource cost component of the cost data. + /// The currency code of the cost. + /// The start time of the cost data. + /// The end time of the cost data. + /// The creation date of the cost. + /// The provisioning status of the resource. + /// The unique immutable identifier of a resource (Guid). + /// A new instance for mocking. + public static DevTestLabCostData DevTestLabCostData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DevTestLabTargetCost targetCost = null, double? estimatedLabCost = null, IEnumerable labCostDetails = null, IEnumerable resourceCosts = null, string currencyCode = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, DateTimeOffset? createdOn = null, string provisioningState = null, Guid? uniqueIdentifier = null) + { + tags ??= new Dictionary(); + labCostDetails ??= new List(); + resourceCosts ??= new List(); + + return new DevTestLabCostData(id, name, resourceType, systemData, tags, location, targetCost, estimatedLabCost != null ? new LabCostSummaryProperties(estimatedLabCost) : null, labCostDetails?.ToList(), resourceCosts?.ToList(), currencyCode, startOn, endOn, createdOn, provisioningState, uniqueIdentifier); + } + + /// Initializes a new instance of DevTestLabCostDetails. + /// The date of the cost item. + /// The cost component of the cost item. + /// The type of the cost. + /// A new instance for mocking. + public static DevTestLabCostDetails DevTestLabCostDetails(DateTimeOffset? @on = null, double? cost = null, DevTestLabCostType? costType = null) + { + return new DevTestLabCostDetails(@on, cost, costType); + } + + /// Initializes a new instance of DevTestLabResourceCost. + /// The name of the resource. + /// The unique identifier of the resource. + /// The cost component of the resource cost item. + /// The logical resource type (ex. virtualmachine, storageaccount). + /// The owner of the resource (ex. janedoe@microsoft.com). + /// The category of the resource (ex. Premium_LRS, Standard_DS1). + /// The status of the resource (ex. Active). + /// The ID of the resource. + /// The ID of the external resource. + /// A new instance for mocking. + public static DevTestLabResourceCost DevTestLabResourceCost(string resourceName = null, string resourceUniqueId = null, double? resourceCost = null, string resourceType = null, string resourceOwner = null, string resourcePricingTier = null, string resourceStatus = null, string resourceId = null, string externalResourceId = null) + { + return new DevTestLabResourceCost(resourceName, resourceUniqueId, resourceCost, resourceType, resourceOwner, resourcePricingTier, resourceStatus, resourceId, externalResourceId); + } + + /// Initializes a new instance of DevTestLabCustomImageData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The virtual machine from which the image is to be created. + /// The VHD from which the image is to be created. + /// The description of the custom image. + /// The author of the custom image. + /// The creation date of the custom image. + /// The Managed Image Id backing the custom image. + /// The Managed Snapshot Id backing the custom image. + /// Storage information about the data disks present in the custom image. + /// Storage information about the plan related to this custom image. + /// Whether or not the custom images underlying offer/plan has been enabled for programmatic deployment. + /// The provisioning status of the resource. + /// The unique immutable identifier of a resource (Guid). + /// A new instance for mocking. + public static DevTestLabCustomImageData DevTestLabCustomImageData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DevTestLabCustomImageVm vm = null, DevTestLabCustomImageVhd vhd = null, string description = null, string author = null, DateTimeOffset? createdOn = null, string managedImageId = null, string managedSnapshotId = null, IEnumerable dataDiskStorageInfo = null, DevTestLabCustomImagePlan customImagePlan = null, bool? isPlanAuthorized = null, string provisioningState = null, Guid? uniqueIdentifier = null) + { + tags ??= new Dictionary(); + dataDiskStorageInfo ??= new List(); + + return new DevTestLabCustomImageData(id, name, resourceType, systemData, tags, location, vm, vhd, description, author, createdOn, managedImageId, managedSnapshotId, dataDiskStorageInfo?.ToList(), customImagePlan, isPlanAuthorized, provisioningState, uniqueIdentifier); + } + + /// Initializes a new instance of DevTestLabFormulaData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The description of the formula. + /// The author of the formula. + /// The OS type of the formula. + /// The creation date of the formula. + /// The content of the formula. + /// Information about a VM from which a formula is to be created. + /// The provisioning status of the resource. + /// The unique immutable identifier of a resource (Guid). + /// A new instance for mocking. + public static DevTestLabFormulaData DevTestLabFormulaData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string description = null, string author = null, string osType = null, DateTimeOffset? createdOn = null, DevTestLabVmCreationContent formulaContent = null, string labVmId = null, string provisioningState = null, Guid? uniqueIdentifier = null) + { + tags ??= new Dictionary(); + + return new DevTestLabFormulaData(id, name, resourceType, systemData, tags, location, description, author, osType, createdOn, formulaContent, labVmId != null ? new FormulaPropertiesFromVm(labVmId) : null, provisioningState, uniqueIdentifier); + } + + /// Initializes a new instance of DevTestLabScheduleCreationParameter. + /// The name of the virtual machine or environment. + /// The location of the new virtual machine or environment. + /// The tags of the resource. + /// The status of the schedule (i.e. Enabled, Disabled). + /// The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + /// If the schedule will occur only some days of the week, specify the weekly recurrence. + /// If the schedule will occur once each day of the week, specify the daily recurrence. + /// If the schedule will occur multiple times a day, specify the hourly recurrence. + /// The time zone ID (e.g. Pacific Standard time). + /// Notification settings. + /// The resource ID to which the schedule belongs. + /// A new instance for mocking. + public static DevTestLabScheduleCreationParameter DevTestLabScheduleCreationParameter(string name = null, AzureLocation? location = null, IDictionary tags = null, DevTestLabEnableStatus? status = null, string taskType = null, DevTestLabWeekDetails weeklyRecurrence = null, string dailyRecurrenceTime = null, int? hourlyRecurrenceMinute = null, string timeZoneId = null, DevTestLabNotificationSettings notificationSettings = null, ResourceIdentifier targetResourceId = null) + { + tags ??= new Dictionary(); + + return new DevTestLabScheduleCreationParameter(name, location, tags, status, taskType, weeklyRecurrence, dailyRecurrenceTime != null ? new DayDetails(dailyRecurrenceTime) : null, hourlyRecurrenceMinute != null ? new HourDetails(hourlyRecurrenceMinute) : null, timeZoneId, notificationSettings, targetResourceId); + } + + /// Initializes a new instance of DevTestLabGalleryImage. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The author of the gallery image. + /// The creation date of the gallery image. + /// The description of the gallery image. + /// The image reference of the gallery image. + /// The icon of the gallery image. + /// Indicates whether this gallery image is enabled. + /// The third party plan that applies to this image. + /// Indicates if the plan has been authorized for programmatic deployment. + /// A new instance for mocking. + public static DevTestLabGalleryImage DevTestLabGalleryImage(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string author = null, DateTimeOffset? createdOn = null, string description = null, DevTestLabGalleryImageReference imageReference = null, string icon = null, bool? isEnabled = null, string planId = null, bool? isPlanAuthorized = null) + { + tags ??= new Dictionary(); + + return new DevTestLabGalleryImage(id, name, resourceType, systemData, tags, location, author, createdOn, description, imageReference, icon, isEnabled, planId, isPlanAuthorized); + } + + /// Initializes a new instance of DevTestLabNotificationChannelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The webhook URL to send notifications to. + /// The email recipient to send notifications to (can be a list of semi-colon separated email addresses). + /// The locale to use when sending a notification (fallback for unsupported languages is EN). + /// Description of notification. + /// The list of event for which this notification is enabled. + /// The creation date of the notification channel. + /// The provisioning status of the resource. + /// The unique immutable identifier of a resource (Guid). + /// A new instance for mocking. + public static DevTestLabNotificationChannelData DevTestLabNotificationChannelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, Uri webHookUri = null, string emailRecipient = null, string notificationLocale = null, string description = null, IEnumerable events = null, DateTimeOffset? createdOn = null, string provisioningState = null, Guid? uniqueIdentifier = null) + { + tags ??= new Dictionary(); + events ??= new List(); + + return new DevTestLabNotificationChannelData(id, name, resourceType, systemData, tags, location, webHookUri, emailRecipient, notificationLocale, description, events?.ToList(), createdOn, provisioningState, uniqueIdentifier); + } + + /// Initializes a new instance of DevTestLabEvaluatePoliciesResult. + /// Results of evaluating a policy set. + /// A new instance for mocking. + public static DevTestLabEvaluatePoliciesResult DevTestLabEvaluatePoliciesResult(IEnumerable results = null) + { + results ??= new List(); + + return new DevTestLabEvaluatePoliciesResult(results?.ToList()); + } + + /// Initializes a new instance of DevTestLabPolicySetResult. + /// A value indicating whether this policy set evaluation has discovered violations. + /// The list of policy violations. + /// A new instance for mocking. + public static DevTestLabPolicySetResult DevTestLabPolicySetResult(bool? hasError = null, IEnumerable policyViolations = null) + { + policyViolations ??= new List(); + + return new DevTestLabPolicySetResult(hasError, policyViolations?.ToList()); + } + + /// Initializes a new instance of DevTestLabPolicyViolation. + /// The code of the policy violation. + /// The message of the policy violation. + /// A new instance for mocking. + public static DevTestLabPolicyViolation DevTestLabPolicyViolation(string code = null, string message = null) + { + return new DevTestLabPolicyViolation(code, message); + } + + /// Initializes a new instance of DevTestLabPolicyData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The description of the policy. + /// The status of the policy. + /// The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. + /// The fact data of the policy. + /// The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + /// The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy). + /// The creation date of the policy. + /// The provisioning status of the resource. + /// The unique immutable identifier of a resource (Guid). + /// A new instance for mocking. + public static DevTestLabPolicyData DevTestLabPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string description = null, DevTestLabPolicyStatus? status = null, DevTestLabPolicyFactName? factName = null, string factData = null, string threshold = null, DevTestLabPolicyEvaluatorType? evaluatorType = null, DateTimeOffset? createdOn = null, string provisioningState = null, Guid? uniqueIdentifier = null) + { + tags ??= new Dictionary(); + + return new DevTestLabPolicyData(id, name, resourceType, systemData, tags, location, description, status, factName, factData, threshold, evaluatorType, createdOn, provisioningState, uniqueIdentifier); + } + + /// Initializes a new instance of DevTestLabServiceRunnerData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The identity of the resource. + /// A new instance for mocking. + public static DevTestLabServiceRunnerData DevTestLabServiceRunnerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DevTestLabManagedIdentity identity = null) + { + tags ??= new Dictionary(); + + return new DevTestLabServiceRunnerData(id, name, resourceType, systemData, tags, location, identity); + } + + /// Initializes a new instance of DevTestLabUserData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The identity of the user. + /// The secret store of the user. + /// The creation date of the user profile. + /// The provisioning status of the resource. + /// The unique immutable identifier of a resource (Guid). + /// A new instance for mocking. + public static DevTestLabUserData DevTestLabUserData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DevTestLabUserIdentity identity = null, DevTestLabUserSecretStore secretStore = null, DateTimeOffset? createdOn = null, string provisioningState = null, Guid? uniqueIdentifier = null) + { + tags ??= new Dictionary(); + + return new DevTestLabUserData(id, name, resourceType, systemData, tags, location, identity, secretStore, createdOn, provisioningState, uniqueIdentifier); + } + + /// Initializes a new instance of DevTestLabDiskData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The storage type for the disk (i.e. Standard, Premium). + /// The size of the disk in Gibibytes. + /// The resource ID of the VM to which this disk is leased. + /// When backed by a blob, the name of the VHD blob without extension. + /// When backed by a blob, the URI of underlying blob. + /// When backed by a blob, the storage account where the blob is. + /// The creation date of the disk. + /// The host caching policy of the disk (i.e. None, ReadOnly, ReadWrite). + /// When backed by managed disk, this is the ID of the compute disk resource. + /// The provisioning status of the resource. + /// The unique immutable identifier of a resource (Guid). + /// A new instance for mocking. + public static DevTestLabDiskData DevTestLabDiskData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DevTestLabStorageType? diskType = null, int? diskSizeGiB = null, ResourceIdentifier leasedByLabVmId = null, string diskBlobName = null, Uri diskUri = null, string storageAccountId = null, DateTimeOffset? createdOn = null, string hostCaching = null, ResourceIdentifier managedDiskId = null, string provisioningState = null, Guid? uniqueIdentifier = null) + { + tags ??= new Dictionary(); + + return new DevTestLabDiskData(id, name, resourceType, systemData, tags, location, diskType, diskSizeGiB, leasedByLabVmId, diskBlobName, diskUri, storageAccountId, createdOn, hostCaching, managedDiskId, provisioningState, uniqueIdentifier); + } + + /// Initializes a new instance of DevTestLabEnvironmentData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The deployment properties of the environment. + /// The display name of the Azure Resource Manager template that produced the environment. + /// The identifier of the resource group containing the environment's resources. + /// The creator of the environment. + /// The provisioning status of the resource. + /// The unique immutable identifier of a resource (Guid). + /// A new instance for mocking. + public static DevTestLabEnvironmentData DevTestLabEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DevTestLabEnvironmentDeployment deploymentProperties = null, string armTemplateDisplayName = null, string resourceGroupId = null, string createdByUser = null, string provisioningState = null, Guid? uniqueIdentifier = null) + { + tags ??= new Dictionary(); + + return new DevTestLabEnvironmentData(id, name, resourceType, systemData, tags, location, deploymentProperties, armTemplateDisplayName, resourceGroupId, createdByUser, provisioningState, uniqueIdentifier); + } + + /// Initializes a new instance of DevTestLabSecretData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The value of the secret for secret creation. + /// The provisioning status of the resource. + /// The unique immutable identifier of a resource (Guid). + /// A new instance for mocking. + public static DevTestLabSecretData DevTestLabSecretData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string value = null, string provisioningState = null, Guid? uniqueIdentifier = null) + { + tags ??= new Dictionary(); + + return new DevTestLabSecretData(id, name, resourceType, systemData, tags, location, value, provisioningState, uniqueIdentifier); + } + + /// Initializes a new instance of DevTestLabServiceFabricData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The backing service fabric resource's id. + /// The resource id of the environment under which the service fabric resource is present. + /// The applicable schedule for the virtual machine. + /// The provisioning status of the resource. + /// The unique immutable identifier of a resource (Guid). + /// A new instance for mocking. + public static DevTestLabServiceFabricData DevTestLabServiceFabricData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string externalServiceFabricId = null, string environmentId = null, DevTestLabApplicableSchedule applicableSchedule = null, string provisioningState = null, Guid? uniqueIdentifier = null) + { + tags ??= new Dictionary(); + + return new DevTestLabServiceFabricData(id, name, resourceType, systemData, tags, location, externalServiceFabricId, environmentId, applicableSchedule, provisioningState, uniqueIdentifier); + } + + /// Initializes a new instance of DevTestLabApplicableSchedule. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The auto-shutdown schedule, if one has been set at the lab or lab resource level. + /// The auto-startup schedule, if one has been set at the lab or lab resource level. + /// A new instance for mocking. + public static DevTestLabApplicableSchedule DevTestLabApplicableSchedule(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DevTestLabScheduleData labVmsShutdown = null, DevTestLabScheduleData labVmsStartup = null) + { + tags ??= new Dictionary(); + + return new DevTestLabApplicableSchedule(id, name, resourceType, systemData, tags, location, labVmsShutdown, labVmsStartup); + } + + /// Initializes a new instance of DevTestLabVmData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The notes of the virtual machine. + /// The object identifier of the owner of the virtual machine. + /// The user principal name of the virtual machine owner. + /// The object identifier of the creator of the virtual machine. + /// The email address of creator of the virtual machine. + /// The creation date of the virtual machine. + /// The resource identifier (Microsoft.Compute) of the virtual machine. + /// The custom image identifier of the virtual machine. + /// The OS type of the virtual machine. + /// The size of the virtual machine. + /// The user name of the virtual machine. + /// The password of the virtual machine administrator. + /// The SSH key of the virtual machine administrator. + /// Indicates whether this virtual machine uses an SSH key for authentication. + /// The fully-qualified domain name of the virtual machine. + /// The lab subnet name of the virtual machine. + /// The lab virtual network identifier of the virtual machine. + /// Indicates whether the virtual machine is to be created without a public IP address. + /// The artifacts to be installed on the virtual machine. + /// The artifact deployment status for the virtual machine. + /// The Microsoft Azure Marketplace image reference of the virtual machine. + /// The id of the plan associated with the virtual machine image. + /// The compute virtual machine properties. + /// The network interface properties. + /// The applicable schedule for the virtual machine. + /// The expiration date for VM. + /// Indicates whether another user can take ownership of the virtual machine. + /// Storage type to use for virtual machine (i.e. Standard, Premium). + /// Tells source of creation of lab virtual machine. Output property only. + /// The resource ID of the environment that contains this virtual machine, if any. + /// New or existing data disks to attach to the virtual machine after creation. + /// Virtual Machine schedules to be created. + /// Last known compute power state captured in DTL. + /// The provisioning status of the resource. + /// The unique immutable identifier of a resource (Guid). + /// A new instance for mocking. + public static DevTestLabVmData DevTestLabVmData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string notes = null, string ownerObjectId = null, string ownerUserPrincipalName = null, string createdByUserId = null, string createdByUser = null, DateTimeOffset? createdOn = null, ResourceIdentifier computeId = null, string customImageId = null, string osType = null, string size = null, string userName = null, string password = null, string sshKey = null, bool? isAuthenticationWithSshKey = null, string fqdn = null, string labSubnetName = null, ResourceIdentifier labVirtualNetworkId = null, bool? disallowPublicIPAddress = null, IEnumerable artifacts = null, DevTestLabArtifactDeploymentStatus artifactDeploymentStatus = null, DevTestLabGalleryImageReference galleryImageReference = null, string planId = null, ComputeVmProperties computeVm = null, DevTestLabNetworkInterface networkInterface = null, DevTestLabApplicableSchedule applicableSchedule = null, DateTimeOffset? expireOn = null, bool? allowClaim = null, string storageType = null, DevTestLabVmCreationSource? vmCreationSource = null, ResourceIdentifier environmentId = null, IEnumerable dataDiskParameters = null, IEnumerable scheduleParameters = null, string lastKnownPowerState = null, string provisioningState = null, Guid? uniqueIdentifier = null) + { + tags ??= new Dictionary(); + artifacts ??= new List(); + dataDiskParameters ??= new List(); + scheduleParameters ??= new List(); + + return new DevTestLabVmData(id, name, resourceType, systemData, tags, location, notes, ownerObjectId, ownerUserPrincipalName, createdByUserId, createdByUser, createdOn, computeId, customImageId, osType, size, userName, password, sshKey, isAuthenticationWithSshKey, fqdn, labSubnetName, labVirtualNetworkId, disallowPublicIPAddress, artifacts?.ToList(), artifactDeploymentStatus, galleryImageReference, planId, computeVm, networkInterface, applicableSchedule, expireOn, allowClaim, storageType, vmCreationSource, environmentId, dataDiskParameters?.ToList(), scheduleParameters?.ToList(), lastKnownPowerState, provisioningState, uniqueIdentifier); + } + + /// Initializes a new instance of DevTestLabArtifactDeploymentStatus. + /// The deployment status of the artifact. + /// The total count of the artifacts that were successfully applied. + /// The total count of the artifacts that were tentatively applied. + /// A new instance for mocking. + public static DevTestLabArtifactDeploymentStatus DevTestLabArtifactDeploymentStatus(string deploymentStatus = null, int? artifactsApplied = null, int? totalArtifacts = null) + { + return new DevTestLabArtifactDeploymentStatus(deploymentStatus, artifactsApplied, totalArtifacts); + } + + /// Initializes a new instance of ComputeVmProperties. + /// Gets the statuses of the virtual machine. + /// Gets the OS type of the virtual machine. + /// Gets the size of the virtual machine. + /// Gets the network interface ID of the virtual machine. + /// Gets OS disk blob uri for the virtual machine. + /// Gets data disks blob uri for the virtual machine. + /// Gets all data disks attached to the virtual machine. + /// A new instance for mocking. + public static ComputeVmProperties ComputeVmProperties(IEnumerable statuses = null, string osType = null, string vmSize = null, string networkInterfaceId = null, string osDiskId = null, IEnumerable dataDiskIds = null, IEnumerable dataDisks = null) + { + statuses ??= new List(); + dataDiskIds ??= new List(); + dataDisks ??= new List(); + + return new ComputeVmProperties(statuses?.ToList(), osType, vmSize, networkInterfaceId, osDiskId, dataDiskIds?.ToList(), dataDisks?.ToList()); + } + + /// Initializes a new instance of ComputeVmInstanceViewStatus. + /// Gets the status Code. + /// Gets the short localizable label for the status. + /// Gets the message associated with the status. + /// A new instance for mocking. + public static ComputeVmInstanceViewStatus ComputeVmInstanceViewStatus(string code = null, string displayStatus = null, string message = null) + { + return new ComputeVmInstanceViewStatus(code, displayStatus, message); + } + + /// Initializes a new instance of ComputeDataDisk. + /// Gets data disk name. + /// When backed by a blob, the URI of underlying blob. + /// When backed by managed disk, this is the ID of the compute disk resource. + /// Gets data disk size in GiB. + /// A new instance for mocking. + public static ComputeDataDisk ComputeDataDisk(string name = null, Uri diskUri = null, string managedDiskId = null, int? diskSizeGiB = null) + { + return new ComputeDataDisk(name, diskUri, managedDiskId, diskSizeGiB); + } + + /// Initializes a new instance of DevTestLabRdpConnection. + /// The contents of the .rdp file. + /// A new instance for mocking. + public static DevTestLabRdpConnection DevTestLabRdpConnection(string contents = null) + { + return new DevTestLabRdpConnection(contents); + } + + /// Initializes a new instance of DevTestLabVirtualNetworkData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The allowed subnets of the virtual network. + /// The description of the virtual network. + /// The Microsoft.Network resource identifier of the virtual network. + /// The external subnet properties. + /// The subnet overrides of the virtual network. + /// The creation date of the virtual network. + /// The provisioning status of the resource. + /// The unique immutable identifier of a resource (Guid). + /// A new instance for mocking. + public static DevTestLabVirtualNetworkData DevTestLabVirtualNetworkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IEnumerable allowedSubnets = null, string description = null, string externalProviderResourceId = null, IEnumerable externalSubnets = null, IEnumerable subnetOverrides = null, DateTimeOffset? createdOn = null, string provisioningState = null, Guid? uniqueIdentifier = null) + { + tags ??= new Dictionary(); + allowedSubnets ??= new List(); + externalSubnets ??= new List(); + subnetOverrides ??= new List(); + + return new DevTestLabVirtualNetworkData(id, name, resourceType, systemData, tags, location, allowedSubnets?.ToList(), description, externalProviderResourceId, externalSubnets?.ToList(), subnetOverrides?.ToList(), createdOn, provisioningState, uniqueIdentifier); + } + + /// Initializes a new instance of DevTestLabExternalSubnet. + /// Gets or sets the identifier. + /// Gets or sets the name. + /// A new instance for mocking. + public static DevTestLabExternalSubnet DevTestLabExternalSubnet(ResourceIdentifier id = null, string name = null) + { + return new DevTestLabExternalSubnet(id, name); + } + + /// Initializes a new instance of DevTestLabGenerateUploadUriResult. + /// The upload URI for the VHD. + /// A new instance for mocking. + public static DevTestLabGenerateUploadUriResult DevTestLabGenerateUploadUriResult(Uri uploadUri = null) + { + return new DevTestLabGenerateUploadUriResult(uploadUri); + } + } +} diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/autorest.md b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/autorest.md index 65e9199a52d9..47c37b561a1e 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/autorest.md +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/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: DevTestLabs namespace: Azure.ResourceManager.DevTestLabs diff --git a/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/CHANGELOG.md b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/CHANGELOG.md index 3520dad55aa4..742253f7a2af 100644 --- a/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/CHANGELOG.md +++ b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/CHANGELOG.md @@ -1,15 +1,16 @@ # Release History -## 1.3.0-beta.1 (Unreleased) +## 1.3.0-beta.1 (2023-05-29) ### 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.2.0 (2023-03-07) ### Features Added diff --git a/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/api/Azure.ResourceManager.DigitalTwins.netstandard2.0.cs b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/api/Azure.ResourceManager.DigitalTwins.netstandard2.0.cs index 43834071c389..2dc74a0522db 100644 --- a/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/api/Azure.ResourceManager.DigitalTwins.netstandard2.0.cs +++ b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/api/Azure.ResourceManager.DigitalTwins.netstandard2.0.cs @@ -208,6 +208,23 @@ protected TimeSeriesDatabaseConnectionResource() { } } namespace Azure.ResourceManager.DigitalTwins.Models { + public static partial class ArmDigitalTwinsModelFactory + { + public static Azure.ResourceManager.DigitalTwins.Models.DataExplorerConnectionProperties DataExplorerConnectionProperties(Azure.ResourceManager.DigitalTwins.Models.TimeSeriesDatabaseConnectionState? provisioningState = default(Azure.ResourceManager.DigitalTwins.Models.TimeSeriesDatabaseConnectionState?), Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsManagedIdentityReference identity = null, Azure.Core.ResourceIdentifier adxResourceId = null, System.Uri adxEndpointUri = null, string adxDatabaseName = null, string adxTableName = null, string adxTwinLifecycleEventsTableName = null, string adxRelationshipLifecycleEventsTableName = null, System.Uri eventHubEndpointUri = null, string eventHubEntityPath = null, Azure.Core.ResourceIdentifier eventHubNamespaceResourceId = null, string eventHubConsumerGroup = null, Azure.ResourceManager.DigitalTwins.Models.RecordPropertyAndItemRemoval? recordPropertyAndItemRemovals = default(Azure.ResourceManager.DigitalTwins.Models.RecordPropertyAndItemRemoval?)) { throw null; } + public static Azure.ResourceManager.DigitalTwins.DigitalTwinsDescriptionData DigitalTwinsDescriptionData(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.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastUpdatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsProvisioningState? provisioningState = default(Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsProvisioningState?), string hostName = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsPublicNetworkAccess?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.DigitalTwins.DigitalTwinsEndpointResourceData DigitalTwinsEndpointResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsEndpointResourceProperties properties = null) { throw null; } + public static Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsEndpointResourceProperties DigitalTwinsEndpointResourceProperties(string endpointType = "Unknown", Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsEndpointProvisioningState? provisioningState = default(Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsEndpointProvisioningState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsAuthenticationType? authenticationType = default(Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsAuthenticationType?), string deadLetterSecret = null, System.Uri deadLetterUri = null, Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsManagedIdentityReference identity = null) { throw null; } + public static Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsEventGridProperties DigitalTwinsEventGridProperties(Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsEndpointProvisioningState? provisioningState = default(Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsEndpointProvisioningState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsAuthenticationType? authenticationType = default(Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsAuthenticationType?), string deadLetterSecret = null, System.Uri deadLetterUri = null, Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsManagedIdentityReference identity = null, string topicEndpoint = null, string accessKey1 = null, string accessKey2 = null) { throw null; } + public static Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsEventHubProperties DigitalTwinsEventHubProperties(Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsEndpointProvisioningState? provisioningState = default(Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsEndpointProvisioningState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsAuthenticationType? authenticationType = default(Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsAuthenticationType?), string deadLetterSecret = null, System.Uri deadLetterUri = null, Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsManagedIdentityReference identity = null, string connectionStringPrimaryKey = null, string connectionStringSecondaryKey = null, System.Uri endpointUri = null, string entityPath = null) { throw null; } + public static Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsNameResult DigitalTwinsNameResult(bool? isNameAvailable = default(bool?), string message = null, Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsNameUnavailableReason? reason = default(Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsNameUnavailableReason?)) { throw null; } + public static Azure.ResourceManager.DigitalTwins.DigitalTwinsPrivateEndpointConnectionData DigitalTwinsPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsPrivateEndpointConnectionProperties properties = null) { throw null; } + public static Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsPrivateEndpointConnectionProperties DigitalTwinsPrivateEndpointConnectionProperties(Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsPrivateLinkResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsPrivateLinkResourceProvisioningState?), Azure.Core.ResourceIdentifier privateEndpointId = null, System.Collections.Generic.IEnumerable groupIds = null, Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsPrivateLinkServiceConnectionState privateLinkServiceConnectionState = null) { throw null; } + public static Azure.ResourceManager.DigitalTwins.DigitalTwinsPrivateLinkResourceData DigitalTwinsPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsPrivateLinkResourceProperties properties = null) { throw null; } + public static Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsPrivateLinkResourceProperties DigitalTwinsPrivateLinkResourceProperties(string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } + public static Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsServiceBusProperties DigitalTwinsServiceBusProperties(Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsEndpointProvisioningState? provisioningState = default(Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsEndpointProvisioningState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsAuthenticationType? authenticationType = default(Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsAuthenticationType?), string deadLetterSecret = null, System.Uri deadLetterUri = null, Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsManagedIdentityReference identity = null, string primaryConnectionString = null, string secondaryConnectionString = null, System.Uri endpointUri = null, string entityPath = null) { throw null; } + public static Azure.ResourceManager.DigitalTwins.TimeSeriesDatabaseConnectionData TimeSeriesDatabaseConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DigitalTwins.Models.TimeSeriesDatabaseConnectionProperties properties = null) { throw null; } + public static Azure.ResourceManager.DigitalTwins.Models.TimeSeriesDatabaseConnectionProperties TimeSeriesDatabaseConnectionProperties(string connectionType = "Unknown", Azure.ResourceManager.DigitalTwins.Models.TimeSeriesDatabaseConnectionState? provisioningState = default(Azure.ResourceManager.DigitalTwins.Models.TimeSeriesDatabaseConnectionState?), Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsManagedIdentityReference identity = null) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct CleanupConnectionArtifact : System.IEquatable { diff --git a/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/ArmDigitalTwinsModelFactory.cs b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/ArmDigitalTwinsModelFactory.cs new file mode 100644 index 000000000000..babe11365d3e --- /dev/null +++ b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/ArmDigitalTwinsModelFactory.cs @@ -0,0 +1,229 @@ +// 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.DigitalTwins; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DigitalTwins.Models +{ + /// Model factory for models. + public static partial class ArmDigitalTwinsModelFactory + { + /// Initializes a new instance of DigitalTwinsDescriptionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Time when DigitalTwinsInstance was created. + /// Time when DigitalTwinsInstance was updated. + /// The provisioning state. + /// Api endpoint to work with DigitalTwinsInstance. + /// The private endpoint connections. + /// Public network access for the DigitalTwinsInstance. + /// The managed identity for the DigitalTwinsInstance. + /// A new instance for mocking. + public static DigitalTwinsDescriptionData DigitalTwinsDescriptionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DateTimeOffset? createdOn = null, DateTimeOffset? lastUpdatedOn = null, DigitalTwinsProvisioningState? provisioningState = null, string hostName = null, IEnumerable privateEndpointConnections = null, DigitalTwinsPublicNetworkAccess? publicNetworkAccess = null, ManagedServiceIdentity identity = null) + { + tags ??= new Dictionary(); + privateEndpointConnections ??= new List(); + + return new DigitalTwinsDescriptionData(id, name, resourceType, systemData, tags, location, createdOn, lastUpdatedOn, provisioningState, hostName, privateEndpointConnections?.ToList(), publicNetworkAccess, identity); + } + + /// Initializes a new instance of DigitalTwinsPrivateEndpointConnectionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The connection properties. + /// A new instance for mocking. + public static DigitalTwinsPrivateEndpointConnectionData DigitalTwinsPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DigitalTwinsPrivateEndpointConnectionProperties properties = null) + { + return new DigitalTwinsPrivateEndpointConnectionData(id, name, resourceType, systemData, properties); + } + + /// Initializes a new instance of DigitalTwinsPrivateEndpointConnectionProperties. + /// The provisioning state. + /// The private endpoint. + /// The list of group ids for the private endpoint connection. + /// The connection state. + /// A new instance for mocking. + public static DigitalTwinsPrivateEndpointConnectionProperties DigitalTwinsPrivateEndpointConnectionProperties(DigitalTwinsPrivateLinkResourceProvisioningState? provisioningState = null, ResourceIdentifier privateEndpointId = null, IEnumerable groupIds = null, DigitalTwinsPrivateLinkServiceConnectionState privateLinkServiceConnectionState = null) + { + groupIds ??= new List(); + + return new DigitalTwinsPrivateEndpointConnectionProperties(provisioningState, privateEndpointId != null ? ResourceManagerModelFactory.SubResource(privateEndpointId) : null, groupIds?.ToList(), privateLinkServiceConnectionState); + } + + /// Initializes a new instance of DigitalTwinsEndpointResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// DigitalTwinsInstance endpoint resource properties. + /// 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 new instance for mocking. + public static DigitalTwinsEndpointResourceData DigitalTwinsEndpointResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DigitalTwinsEndpointResourceProperties properties = null) + { + return new DigitalTwinsEndpointResourceData(id, name, resourceType, systemData, properties); + } + + /// Initializes a new instance of DigitalTwinsEndpointResourceProperties. + /// The type of Digital Twins endpoint. + /// The provisioning state. + /// Time when the Endpoint was added to DigitalTwinsInstance. + /// Specifies the authentication type being used for connecting to the endpoint. Defaults to 'KeyBased'. If 'KeyBased' is selected, a connection string must be specified (at least the primary connection string). If 'IdentityBased' is select, the endpointUri and entityPath properties must be specified. + /// Dead letter storage secret for key-based authentication. Will be obfuscated during read. + /// Dead letter storage URL for identity-based authentication. + /// Managed identity properties for the endpoint. + /// A new instance for mocking. + public static DigitalTwinsEndpointResourceProperties DigitalTwinsEndpointResourceProperties(string endpointType = "Unknown", DigitalTwinsEndpointProvisioningState? provisioningState = null, DateTimeOffset? createdOn = null, DigitalTwinsAuthenticationType? authenticationType = null, string deadLetterSecret = null, Uri deadLetterUri = null, DigitalTwinsManagedIdentityReference identity = null) + { + return new UnknownDigitalTwinsEndpointResourceProperties(endpointType, provisioningState, createdOn, authenticationType, deadLetterSecret, deadLetterUri, identity); + } + + /// Initializes a new instance of DigitalTwinsNameResult. + /// Specifies a Boolean value that indicates if the name is available. + /// Message indicating an unavailable name due to a conflict, or a description of the naming rules that are violated. + /// Message providing the reason why the given name is invalid. + /// A new instance for mocking. + public static DigitalTwinsNameResult DigitalTwinsNameResult(bool? isNameAvailable = null, string message = null, DigitalTwinsNameUnavailableReason? reason = null) + { + return new DigitalTwinsNameResult(isNameAvailable, message, reason); + } + + /// Initializes a new instance of DigitalTwinsPrivateLinkResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The group information properties. + /// A new instance for mocking. + public static DigitalTwinsPrivateLinkResourceData DigitalTwinsPrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DigitalTwinsPrivateLinkResourceProperties properties = null) + { + return new DigitalTwinsPrivateLinkResourceData(id, name, resourceType, systemData, properties); + } + + /// Initializes a new instance of DigitalTwinsPrivateLinkResourceProperties. + /// The group id. + /// The required members for a specific group id. + /// The required DNS zones for a specific group id. + /// A new instance for mocking. + public static DigitalTwinsPrivateLinkResourceProperties DigitalTwinsPrivateLinkResourceProperties(string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null) + { + requiredMembers ??= new List(); + requiredZoneNames ??= new List(); + + return new DigitalTwinsPrivateLinkResourceProperties(groupId, requiredMembers?.ToList(), requiredZoneNames?.ToList()); + } + + /// Initializes a new instance of TimeSeriesDatabaseConnectionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// Properties of a specific time series database connection. + /// 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 . + /// + /// A new instance for mocking. + public static TimeSeriesDatabaseConnectionData TimeSeriesDatabaseConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, TimeSeriesDatabaseConnectionProperties properties = null) + { + return new TimeSeriesDatabaseConnectionData(id, name, resourceType, systemData, properties); + } + + /// Initializes a new instance of TimeSeriesDatabaseConnectionProperties. + /// The type of time series connection resource. + /// The provisioning state. + /// Managed identity properties for the time series database connection resource. + /// A new instance for mocking. + public static TimeSeriesDatabaseConnectionProperties TimeSeriesDatabaseConnectionProperties(string connectionType = "Unknown", TimeSeriesDatabaseConnectionState? provisioningState = null, DigitalTwinsManagedIdentityReference identity = null) + { + return new UnknownTimeSeriesDatabaseConnectionProperties(connectionType, provisioningState, identity); + } + + /// Initializes a new instance of DigitalTwinsServiceBusProperties. + /// The provisioning state. + /// Time when the Endpoint was added to DigitalTwinsInstance. + /// Specifies the authentication type being used for connecting to the endpoint. Defaults to 'KeyBased'. If 'KeyBased' is selected, a connection string must be specified (at least the primary connection string). If 'IdentityBased' is select, the endpointUri and entityPath properties must be specified. + /// Dead letter storage secret for key-based authentication. Will be obfuscated during read. + /// Dead letter storage URL for identity-based authentication. + /// Managed identity properties for the endpoint. + /// PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. + /// SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. + /// The URL of the ServiceBus namespace for identity-based authentication. It must include the protocol 'sb://'. + /// The ServiceBus Topic name for identity-based authentication. + /// A new instance for mocking. + public static DigitalTwinsServiceBusProperties DigitalTwinsServiceBusProperties(DigitalTwinsEndpointProvisioningState? provisioningState = null, DateTimeOffset? createdOn = null, DigitalTwinsAuthenticationType? authenticationType = null, string deadLetterSecret = null, Uri deadLetterUri = null, DigitalTwinsManagedIdentityReference identity = null, string primaryConnectionString = null, string secondaryConnectionString = null, Uri endpointUri = null, string entityPath = null) + { + return new DigitalTwinsServiceBusProperties(EndpointType.ServiceBus, provisioningState, createdOn, authenticationType, deadLetterSecret, deadLetterUri, identity, primaryConnectionString, secondaryConnectionString, endpointUri, entityPath); + } + + /// Initializes a new instance of DigitalTwinsEventHubProperties. + /// The provisioning state. + /// Time when the Endpoint was added to DigitalTwinsInstance. + /// Specifies the authentication type being used for connecting to the endpoint. Defaults to 'KeyBased'. If 'KeyBased' is selected, a connection string must be specified (at least the primary connection string). If 'IdentityBased' is select, the endpointUri and entityPath properties must be specified. + /// Dead letter storage secret for key-based authentication. Will be obfuscated during read. + /// Dead letter storage URL for identity-based authentication. + /// Managed identity properties for the endpoint. + /// PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. + /// SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. + /// The URL of the EventHub namespace for identity-based authentication. It must include the protocol 'sb://'. + /// The EventHub name in the EventHub namespace for identity-based authentication. + /// A new instance for mocking. + public static DigitalTwinsEventHubProperties DigitalTwinsEventHubProperties(DigitalTwinsEndpointProvisioningState? provisioningState = null, DateTimeOffset? createdOn = null, DigitalTwinsAuthenticationType? authenticationType = null, string deadLetterSecret = null, Uri deadLetterUri = null, DigitalTwinsManagedIdentityReference identity = null, string connectionStringPrimaryKey = null, string connectionStringSecondaryKey = null, Uri endpointUri = null, string entityPath = null) + { + return new DigitalTwinsEventHubProperties(EndpointType.EventHub, provisioningState, createdOn, authenticationType, deadLetterSecret, deadLetterUri, identity, connectionStringPrimaryKey, connectionStringSecondaryKey, endpointUri, entityPath); + } + + /// Initializes a new instance of DigitalTwinsEventGridProperties. + /// The provisioning state. + /// Time when the Endpoint was added to DigitalTwinsInstance. + /// Specifies the authentication type being used for connecting to the endpoint. Defaults to 'KeyBased'. If 'KeyBased' is selected, a connection string must be specified (at least the primary connection string). If 'IdentityBased' is select, the endpointUri and entityPath properties must be specified. + /// Dead letter storage secret for key-based authentication. Will be obfuscated during read. + /// Dead letter storage URL for identity-based authentication. + /// Managed identity properties for the endpoint. + /// EventGrid Topic Endpoint. + /// EventGrid secondary accesskey. Will be obfuscated during read. + /// EventGrid secondary accesskey. Will be obfuscated during read. + /// A new instance for mocking. + public static DigitalTwinsEventGridProperties DigitalTwinsEventGridProperties(DigitalTwinsEndpointProvisioningState? provisioningState = null, DateTimeOffset? createdOn = null, DigitalTwinsAuthenticationType? authenticationType = null, string deadLetterSecret = null, Uri deadLetterUri = null, DigitalTwinsManagedIdentityReference identity = null, string topicEndpoint = null, string accessKey1 = null, string accessKey2 = null) + { + return new DigitalTwinsEventGridProperties(EndpointType.EventGrid, provisioningState, createdOn, authenticationType, deadLetterSecret, deadLetterUri, identity, topicEndpoint, accessKey1, accessKey2); + } + + /// Initializes a new instance of DataExplorerConnectionProperties. + /// The provisioning state. + /// Managed identity properties for the time series database connection resource. + /// The resource ID of the Azure Data Explorer cluster. + /// The URI of the Azure Data Explorer endpoint. + /// The name of the Azure Data Explorer database. + /// The name of the Azure Data Explorer table used for storing updates to properties of twins and relationships. Defaults to AdtPropertyEvents. + /// The name of the Azure Data Explorer table used for recording twin lifecycle events. The table will not be created if this property is left unspecified. + /// The name of the Azure Data Explorer table used for recording relationship lifecycle events. The table will not be created if this property is left unspecified. + /// The URL of the EventHub namespace for identity-based authentication. It must include the protocol sb://. + /// The EventHub name in the EventHub namespace for identity-based authentication. + /// The resource ID of the EventHub namespace. + /// The EventHub consumer group to use when ADX reads from EventHub. Defaults to $Default. + /// Specifies whether or not to record twin / relationship property and item removals, including removals of indexed or keyed values (such as map entries, array elements, etc.). This feature is de-activated unless explicitly set to 'true'. Setting this property to 'true' will generate an additional column in the property events table in ADX. + /// A new instance for mocking. + public static DataExplorerConnectionProperties DataExplorerConnectionProperties(TimeSeriesDatabaseConnectionState? provisioningState = null, DigitalTwinsManagedIdentityReference identity = null, ResourceIdentifier adxResourceId = null, Uri adxEndpointUri = null, string adxDatabaseName = null, string adxTableName = null, string adxTwinLifecycleEventsTableName = null, string adxRelationshipLifecycleEventsTableName = null, Uri eventHubEndpointUri = null, string eventHubEntityPath = null, ResourceIdentifier eventHubNamespaceResourceId = null, string eventHubConsumerGroup = null, RecordPropertyAndItemRemoval? recordPropertyAndItemRemovals = null) + { + return new DataExplorerConnectionProperties(ConnectionType.AzureDataExplorer, provisioningState, identity, adxResourceId, adxEndpointUri, adxDatabaseName, adxTableName, adxTwinLifecycleEventsTableName, adxRelationshipLifecycleEventsTableName, eventHubEndpointUri, eventHubEntityPath, eventHubNamespaceResourceId, eventHubConsumerGroup, recordPropertyAndItemRemovals); + } + } +} diff --git a/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/autorest.md b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/autorest.md index abae3b77b162..107ed9f9ecdb 100644 --- a/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/autorest.md +++ b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/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: DigitalTwins namespace: Azure.ResourceManager.DigitalTwins diff --git a/sdk/dns/Azure.ResourceManager.Dns/CHANGELOG.md b/sdk/dns/Azure.ResourceManager.Dns/CHANGELOG.md index 786d3283c8ed..1d3bce503faf 100644 --- a/sdk/dns/Azure.ResourceManager.Dns/CHANGELOG.md +++ b/sdk/dns/Azure.ResourceManager.Dns/CHANGELOG.md @@ -1,15 +1,16 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2023-05-29) ### 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-28) ### Other Changes diff --git a/sdk/dns/Azure.ResourceManager.Dns/api/Azure.ResourceManager.Dns.netstandard2.0.cs b/sdk/dns/Azure.ResourceManager.Dns/api/Azure.ResourceManager.Dns.netstandard2.0.cs index c2393aa0ea26..f6ea695a4e85 100644 --- a/sdk/dns/Azure.ResourceManager.Dns/api/Azure.ResourceManager.Dns.netstandard2.0.cs +++ b/sdk/dns/Azure.ResourceManager.Dns/api/Azure.ResourceManager.Dns.netstandard2.0.cs @@ -465,6 +465,12 @@ protected DnsZoneResource() { } } namespace Azure.ResourceManager.Dns.Models { + public static partial class ArmDnsModelFactory + { + public static Azure.ResourceManager.Dns.Models.DnsResourceReference DnsResourceReference(System.Collections.Generic.IEnumerable dnsResources = null, Azure.Core.ResourceIdentifier targetResourceId = null) { throw null; } + public static Azure.ResourceManager.Dns.Models.DnsResourceReferenceResult DnsResourceReferenceResult(System.Collections.Generic.IEnumerable dnsResourceReferences = null) { throw null; } + public static Azure.ResourceManager.Dns.DnsZoneData DnsZoneData(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?), long? maxNumberOfRecords = default(long?), long? maxNumberOfRecordsPerRecord = default(long?), long? numberOfRecords = default(long?), System.Collections.Generic.IEnumerable nameServers = null, Azure.ResourceManager.Dns.Models.DnsZoneType? zoneType = default(Azure.ResourceManager.Dns.Models.DnsZoneType?), System.Collections.Generic.IEnumerable registrationVirtualNetworks = null, System.Collections.Generic.IEnumerable resolutionVirtualNetworks = null) { throw null; } + } public partial class DnsAaaaRecordInfo { public DnsAaaaRecordInfo() { } diff --git a/sdk/dns/Azure.ResourceManager.Dns/src/Generated/ArmDnsModelFactory.cs b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/ArmDnsModelFactory.cs new file mode 100644 index 000000000000..e309158bda87 --- /dev/null +++ b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/ArmDnsModelFactory.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Linq; +using Azure; +using Azure.Core; +using Azure.ResourceManager.Dns; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Dns.Models +{ + /// Model factory for models. + public static partial class ArmDnsModelFactory + { + + /// Initializes a new instance of DnsZoneData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The etag of the zone. + /// The maximum number of record sets that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. + /// The maximum number of records per record set that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. + /// The current number of record sets in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. + /// The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be ignored. + /// The type of this DNS zone (Public or Private). + /// A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private. + /// A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is Private. + /// A new instance for mocking. + public static DnsZoneData DnsZoneData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, long? maxNumberOfRecords = null, long? maxNumberOfRecordsPerRecord = null, long? numberOfRecords = null, IEnumerable nameServers = null, DnsZoneType? zoneType = null, IEnumerable registrationVirtualNetworks = null, IEnumerable resolutionVirtualNetworks = null) + { + tags ??= new Dictionary(); + nameServers ??= new List(); + registrationVirtualNetworks ??= new List(); + resolutionVirtualNetworks ??= new List(); + + return new DnsZoneData(id, name, resourceType, systemData, tags, location, etag, maxNumberOfRecords, maxNumberOfRecordsPerRecord, numberOfRecords, nameServers?.ToList(), zoneType, registrationVirtualNetworks?.ToList(), resolutionVirtualNetworks?.ToList()); + } + + /// Initializes a new instance of DnsResourceReferenceResult. + /// The result of dns resource reference request. A list of dns resource references for each of the azure resource in the request. + /// A new instance for mocking. + public static DnsResourceReferenceResult DnsResourceReferenceResult(IEnumerable dnsResourceReferences = null) + { + dnsResourceReferences ??= new List(); + + return new DnsResourceReferenceResult(dnsResourceReferences?.ToList()); + } + + /// Initializes a new instance of DnsResourceReference. + /// A list of dns Records. + /// A reference to an azure resource from where the dns resource value is taken. + /// A new instance for mocking. + public static DnsResourceReference DnsResourceReference(IEnumerable dnsResources = null, ResourceIdentifier targetResourceId = null) + { + dnsResources ??= new List(); + + return new DnsResourceReference(dnsResources?.ToList(), targetResourceId != null ? ResourceManagerModelFactory.WritableSubResource(targetResourceId) : null); + } + } +} diff --git a/sdk/dns/Azure.ResourceManager.Dns/src/autorest.md b/sdk/dns/Azure.ResourceManager.Dns/src/autorest.md index 4a99827bec54..6cf47adce7b6 100644 --- a/sdk/dns/Azure.ResourceManager.Dns/src/autorest.md +++ b/sdk/dns/Azure.ResourceManager.Dns/src/autorest.md @@ -4,7 +4,6 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true -generate-model-factory: false library-name: Dns namespace: Azure.ResourceManager.Dns require: https://github.com/Azure/azure-rest-api-specs/blob/48a49f06399fbdf21f17406b5042f96a5d573bf0/specification/dns/resource-manager/readme.md @@ -128,4 +127,4 @@ directive: transform: > $.RecordSetProperties.properties.MXRecords["x-ms-client-name"] = "MXRecords"; $.RecordSetProperties.properties.NSRecords["x-ms-client-name"] = "NSRecords"; -``` \ No newline at end of file +``` diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md index aed00692c4e0..c8dabbbd7912 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md @@ -1,15 +1,16 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2023-05-29) ### 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-14) ### Other Changes diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs index 64acd9335304..b9e89815c29a 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs @@ -293,6 +293,16 @@ protected VirtualNetworkDnsResolverResource() { } } namespace Azure.ResourceManager.DnsResolver.Models { + public static partial class ArmDnsResolverModelFactory + { + public static Azure.ResourceManager.DnsResolver.DnsForwardingRuleData DnsForwardingRuleData(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?), string domainName = null, System.Collections.Generic.IEnumerable targetDnsServers = null, System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.DnsResolver.Models.DnsForwardingRuleState? dnsForwardingRuleState = default(Azure.ResourceManager.DnsResolver.Models.DnsForwardingRuleState?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetData DnsForwardingRulesetData(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 dnsResolverOutboundEndpoints = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetVirtualNetworkLinkData DnsForwardingRulesetVirtualNetworkLinkData(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?), Azure.Core.ResourceIdentifier virtualNetworkId = null, System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsResolverData DnsResolverData(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.Core.ResourceIdentifier virtualNetworkId = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverState? dnsResolverState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverState?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsResolverInboundEndpointData DnsResolverInboundEndpointData(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 ipConfigurations = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsResolverOutboundEndpointData DnsResolverOutboundEndpointData(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.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DnsResolver.Models.VirtualNetworkDnsForwardingRuleset VirtualNetworkDnsForwardingRuleset(Azure.Core.ResourceIdentifier id = null, Azure.Core.ResourceIdentifier virtualNetworkLinkId = null) { throw null; } + } public partial class DnsForwardingRulePatch { public DnsForwardingRulePatch() { } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs new file mode 100644 index 000000000000..a84065fc4b3b --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs @@ -0,0 +1,147 @@ +// 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.DnsResolver; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + /// Model factory for models. + public static partial class ArmDnsResolverModelFactory + { + /// Initializes a new instance of DnsResolverData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// ETag of the DNS resolver. + /// The reference to the virtual network. This cannot be changed after creation. + /// The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. + /// The current provisioning state of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid property of the DNS resolver resource. + /// A new instance for mocking. + public static DnsResolverData DnsResolverData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, ResourceIdentifier virtualNetworkId = null, DnsResolverState? dnsResolverState = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) + { + tags ??= new Dictionary(); + + return new DnsResolverData(id, name, resourceType, systemData, tags, location, etag, virtualNetworkId != null ? ResourceManagerModelFactory.WritableSubResource(virtualNetworkId) : null, dnsResolverState, provisioningState, resourceGuid); + } + + /// Initializes a new instance of DnsResolverInboundEndpointData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// ETag of the inbound endpoint. + /// IP configurations for the inbound endpoint. + /// The current provisioning state of the inbound endpoint. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid property of the inbound endpoint resource. + /// A new instance for mocking. + public static DnsResolverInboundEndpointData DnsResolverInboundEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, IEnumerable ipConfigurations = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) + { + tags ??= new Dictionary(); + ipConfigurations ??= new List(); + + return new DnsResolverInboundEndpointData(id, name, resourceType, systemData, tags, location, etag, ipConfigurations?.ToList(), provisioningState, resourceGuid); + } + + /// Initializes a new instance of DnsResolverOutboundEndpointData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// ETag of the outbound endpoint. + /// The reference to the subnet used for the outbound endpoint. + /// The current provisioning state of the outbound endpoint. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid property of the outbound endpoint resource. + /// A new instance for mocking. + public static DnsResolverOutboundEndpointData DnsResolverOutboundEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, ResourceIdentifier subnetId = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) + { + tags ??= new Dictionary(); + + return new DnsResolverOutboundEndpointData(id, name, resourceType, systemData, tags, location, etag, subnetId != null ? ResourceManagerModelFactory.WritableSubResource(subnetId) : null, provisioningState, resourceGuid); + } + + /// Initializes a new instance of DnsForwardingRulesetData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// ETag of the DNS forwarding ruleset. + /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. + /// The current provisioning state of the DNS forwarding ruleset. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid for the DNS forwarding ruleset. + /// A new instance for mocking. + public static DnsForwardingRulesetData DnsForwardingRulesetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, IEnumerable dnsResolverOutboundEndpoints = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) + { + tags ??= new Dictionary(); + dnsResolverOutboundEndpoints ??= new List(); + + return new DnsForwardingRulesetData(id, name, resourceType, systemData, tags, location, etag, dnsResolverOutboundEndpoints?.ToList(), provisioningState, resourceGuid); + } + + /// Initializes a new instance of DnsForwardingRuleData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// ETag of the forwarding rule. + /// The domain name for the forwarding rule. + /// DNS servers to forward the DNS query to. + /// Metadata attached to the forwarding rule. + /// The state of forwarding rule. + /// The current provisioning state of the forwarding rule. This is a read-only property and any attempt to set this value will be ignored. + /// A new instance for mocking. + public static DnsForwardingRuleData DnsForwardingRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? etag = null, string domainName = null, IEnumerable targetDnsServers = null, IDictionary metadata = null, DnsForwardingRuleState? dnsForwardingRuleState = null, DnsResolverProvisioningState? provisioningState = null) + { + targetDnsServers ??= new List(); + metadata ??= new Dictionary(); + + return new DnsForwardingRuleData(id, name, resourceType, systemData, etag, domainName, targetDnsServers?.ToList(), metadata, dnsForwardingRuleState, provisioningState); + } + + /// Initializes a new instance of DnsForwardingRulesetVirtualNetworkLinkData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// ETag of the virtual network link. + /// The reference to the virtual network. This cannot be changed after creation. + /// Metadata attached to the virtual network link. + /// The current provisioning state of the virtual network link. This is a read-only property and any attempt to set this value will be ignored. + /// A new instance for mocking. + public static DnsForwardingRulesetVirtualNetworkLinkData DnsForwardingRulesetVirtualNetworkLinkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? etag = null, ResourceIdentifier virtualNetworkId = null, IDictionary metadata = null, DnsResolverProvisioningState? provisioningState = null) + { + metadata ??= new Dictionary(); + + return new DnsForwardingRulesetVirtualNetworkLinkData(id, name, resourceType, systemData, etag, virtualNetworkId != null ? ResourceManagerModelFactory.WritableSubResource(virtualNetworkId) : null, metadata, provisioningState); + } + + /// Initializes a new instance of VirtualNetworkDnsForwardingRuleset. + /// DNS Forwarding Ruleset Resource ID. + /// The reference to the virtual network link. + /// A new instance for mocking. + public static VirtualNetworkDnsForwardingRuleset VirtualNetworkDnsForwardingRuleset(ResourceIdentifier id = null, ResourceIdentifier virtualNetworkLinkId = null) + { + return new VirtualNetworkDnsForwardingRuleset(id, virtualNetworkLinkId != null ? ResourceManagerModelFactory.WritableSubResource(virtualNetworkLinkId) : null); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md index a27de07f8a6d..0c5b4deff9a8 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md @@ -4,7 +4,6 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true -generate-model-factory: false require: https://github.com/Azure/azure-rest-api-specs/blob/a9e895ccfe29d0646795f7ff1cb78e185bd09529/specification/dnsresolver/resource-manager/readme.md library-name: dnsresolver namespace: Azure.ResourceManager.DnsResolver diff --git a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/CHANGELOG.md b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/CHANGELOG.md index dc1b761baecc..64ba80bfc917 100644 --- a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/CHANGELOG.md +++ b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/CHANGELOG.md @@ -1,15 +1,16 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2023-05-29) ### 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-17) ### Other Changes diff --git a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/api/Azure.ResourceManager.Dynatrace.netstandard2.0.cs b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/api/Azure.ResourceManager.Dynatrace.netstandard2.0.cs index b212acff74cc..fb987bd887c8 100644 --- a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/api/Azure.ResourceManager.Dynatrace.netstandard2.0.cs +++ b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/api/Azure.ResourceManager.Dynatrace.netstandard2.0.cs @@ -190,6 +190,19 @@ namespace Azure.ResourceManager.Dynatrace.Models public static bool operator !=(Azure.ResourceManager.Dynatrace.Models.ActivityLogsSendingStatus left, Azure.ResourceManager.Dynatrace.Models.ActivityLogsSendingStatus right) { throw null; } public override string ToString() { throw null; } } + public static partial class ArmDynatraceModelFactory + { + public static Azure.ResourceManager.Dynatrace.Models.DynatraceAccountCredentialsInfo DynatraceAccountCredentialsInfo(string accountId = null, string apiKey = null, string regionId = null) { throw null; } + public static Azure.ResourceManager.Dynatrace.Models.DynatraceMonitoredResourceDetails DynatraceMonitoredResourceDetails(Azure.Core.ResourceIdentifier id = null, Azure.ResourceManager.Dynatrace.Models.MetricsSendingStatus? sendingMetricsStatus = default(Azure.ResourceManager.Dynatrace.Models.MetricsSendingStatus?), string reasonForMetricsStatus = null, Azure.ResourceManager.Dynatrace.Models.LogsSendingStatus? sendingLogsStatus = default(Azure.ResourceManager.Dynatrace.Models.LogsSendingStatus?), string reasonForLogsStatus = null) { throw null; } + public static Azure.ResourceManager.Dynatrace.Models.DynatraceMonitorVmInfo DynatraceMonitorVmInfo(Azure.Core.ResourceIdentifier resourceId = null, string version = null, Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentMonitoringType? monitoringType = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentMonitoringType?), Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAutoUpdateSetting? autoUpdateSetting = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAutoUpdateSetting?), Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentUpdateStatus? updateStatus = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentUpdateStatus?), Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAvailabilityState? availabilityState = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAvailabilityState?), Azure.ResourceManager.Dynatrace.Models.DynatraceLogModuleState? logModule = default(Azure.ResourceManager.Dynatrace.Models.DynatraceLogModuleState?), string hostGroup = null, string hostName = null) { throw null; } + public static Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentEnabledAppServiceInfo DynatraceOneAgentEnabledAppServiceInfo(Azure.Core.ResourceIdentifier resourceId = null, string version = null, Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentMonitoringType? monitoringType = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentMonitoringType?), Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAutoUpdateSetting? autoUpdateSetting = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAutoUpdateSetting?), Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentUpdateStatus? updateStatus = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentUpdateStatus?), Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAvailabilityState? availabilityState = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAvailabilityState?), Azure.ResourceManager.Dynatrace.Models.DynatraceLogModuleState? logModule = default(Azure.ResourceManager.Dynatrace.Models.DynatraceLogModuleState?), string hostGroup = null, string hostName = null) { throw null; } + public static Azure.ResourceManager.Dynatrace.DynatraceSingleSignOnData DynatraceSingleSignOnData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Dynatrace.Models.DynatraceSingleSignOnState? singleSignOnState = default(Azure.ResourceManager.Dynatrace.Models.DynatraceSingleSignOnState?), System.Guid? enterpriseAppId = default(System.Guid?), System.Uri singleSignOnUri = null, System.Collections.Generic.IEnumerable aadDomains = null, Azure.ResourceManager.Dynatrace.Models.DynatraceProvisioningState? provisioningState = default(Azure.ResourceManager.Dynatrace.Models.DynatraceProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Dynatrace.Models.DynatraceSingleSignOnProperties DynatraceSingleSignOnProperties(Azure.ResourceManager.Dynatrace.Models.DynatraceSingleSignOnState? singleSignOnState = default(Azure.ResourceManager.Dynatrace.Models.DynatraceSingleSignOnState?), System.Guid? enterpriseAppId = default(System.Guid?), System.Uri singleSignOnUri = null, System.Collections.Generic.IEnumerable aadDomains = null, Azure.ResourceManager.Dynatrace.Models.DynatraceProvisioningState? provisioningState = default(Azure.ResourceManager.Dynatrace.Models.DynatraceProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Dynatrace.Models.DynatraceSsoDetailsResult DynatraceSsoDetailsResult(Azure.ResourceManager.Dynatrace.Models.DynatraceSsoStatus? isSsoEnabled = default(Azure.ResourceManager.Dynatrace.Models.DynatraceSsoStatus?), System.Uri metadataUri = null, System.Uri singleSignOnUri = null, System.Collections.Generic.IEnumerable aadDomains = null, System.Collections.Generic.IEnumerable adminUsers = null) { throw null; } + public static Azure.ResourceManager.Dynatrace.DynatraceTagRuleData DynatraceTagRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Dynatrace.Models.DynatraceMonitorResourceLogRules logRules = null, System.Collections.Generic.IEnumerable metricRulesFilteringTags = null, Azure.ResourceManager.Dynatrace.Models.DynatraceProvisioningState? provisioningState = default(Azure.ResourceManager.Dynatrace.Models.DynatraceProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Dynatrace.Models.DynatraceVmExtensionPayload DynatraceVmExtensionPayload(string ingestionKey = null, string environmentId = null) { throw null; } + public static Azure.ResourceManager.Dynatrace.Models.LinkableEnvironmentResult LinkableEnvironmentResult(string environmentId = null, string environmentName = null, Azure.ResourceManager.Dynatrace.Models.DynatraceBillingPlanInfo planData = null) { throw null; } + } public partial class DynatraceAccountCredentialsInfo { internal DynatraceAccountCredentialsInfo() { } diff --git a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/ArmDynatraceModelFactory.cs b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/ArmDynatraceModelFactory.cs new file mode 100644 index 000000000000..050a9f22a6d5 --- /dev/null +++ b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/ArmDynatraceModelFactory.cs @@ -0,0 +1,156 @@ +// 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.Dynatrace; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Dynatrace.Models +{ + /// Model factory for models. + public static partial class ArmDynatraceModelFactory + { + /// Initializes a new instance of DynatraceAccountCredentialsInfo. + /// Account Id of the account this environment is linked to. + /// API Key of the user account. + /// Region in which the account is created. + /// A new instance for mocking. + public static DynatraceAccountCredentialsInfo DynatraceAccountCredentialsInfo(string accountId = null, string apiKey = null, string regionId = null) + { + return new DynatraceAccountCredentialsInfo(accountId, apiKey, regionId); + } + + /// Initializes a new instance of DynatraceMonitoredResourceDetails. + /// The ARM id of the resource. + /// Flag indicating if resource is sending metrics to Dynatrace. + /// Reason for why the resource is sending metrics (or why it is not sending). + /// Flag indicating if resource is sending logs to Dynatrace. + /// Reason for why the resource is sending logs (or why it is not sending). + /// A new instance for mocking. + public static DynatraceMonitoredResourceDetails DynatraceMonitoredResourceDetails(ResourceIdentifier id = null, MetricsSendingStatus? sendingMetricsStatus = null, string reasonForMetricsStatus = null, LogsSendingStatus? sendingLogsStatus = null, string reasonForLogsStatus = null) + { + return new DynatraceMonitoredResourceDetails(id, sendingMetricsStatus, reasonForMetricsStatus, sendingLogsStatus, reasonForLogsStatus); + } + + /// Initializes a new instance of DynatraceVmExtensionPayload. + /// Ingestion key of the environment. + /// Id of the environment created. + /// A new instance for mocking. + public static DynatraceVmExtensionPayload DynatraceVmExtensionPayload(string ingestionKey = null, string environmentId = null) + { + return new DynatraceVmExtensionPayload(ingestionKey, environmentId); + } + + /// Initializes a new instance of DynatraceSingleSignOnProperties. + /// State of Single Sign On. + /// Version of the Dynatrace agent installed on the VM. + /// The login URL specific to this Dynatrace Environment. + /// array of Aad(azure active directory) domains. + /// Provisioning state of the resource. + /// A new instance for mocking. + public static DynatraceSingleSignOnProperties DynatraceSingleSignOnProperties(DynatraceSingleSignOnState? singleSignOnState = null, Guid? enterpriseAppId = null, Uri singleSignOnUri = null, IEnumerable aadDomains = null, DynatraceProvisioningState? provisioningState = null) + { + aadDomains ??= new List(); + + return new DynatraceSingleSignOnProperties(singleSignOnState, enterpriseAppId, singleSignOnUri, aadDomains?.ToList(), provisioningState); + } + + /// Initializes a new instance of DynatraceTagRuleData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Set of rules for sending logs for the Monitor resource. + /// Set of rules for sending metrics for the Monitor resource. + /// Provisioning state of the resource. + /// A new instance for mocking. + public static DynatraceTagRuleData DynatraceTagRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DynatraceMonitorResourceLogRules logRules = null, IEnumerable metricRulesFilteringTags = null, DynatraceProvisioningState? provisioningState = null) + { + metricRulesFilteringTags ??= new List(); + + return new DynatraceTagRuleData(id, name, resourceType, systemData, logRules, metricRulesFilteringTags != null ? new DynatraceMonitorResourceMetricRules(metricRulesFilteringTags?.ToList()) : null, provisioningState); + } + + /// Initializes a new instance of DynatraceSingleSignOnData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// State of Single Sign On. + /// Version of the Dynatrace agent installed on the VM. + /// The login URL specific to this Dynatrace Environment. + /// array of Aad(azure active directory) domains. + /// Provisioning state of the resource. + /// A new instance for mocking. + public static DynatraceSingleSignOnData DynatraceSingleSignOnData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DynatraceSingleSignOnState? singleSignOnState = null, Guid? enterpriseAppId = null, Uri singleSignOnUri = null, IEnumerable aadDomains = null, DynatraceProvisioningState? provisioningState = null) + { + aadDomains ??= new List(); + + return new DynatraceSingleSignOnData(id, name, resourceType, systemData, singleSignOnState, enterpriseAppId, singleSignOnUri, aadDomains?.ToList(), provisioningState); + } + + /// Initializes a new instance of DynatraceMonitorVmInfo. + /// Azure VM resource ID. + /// Version of the Dynatrace agent installed on the VM. + /// The monitoring mode of OneAgent. + /// Update settings of OneAgent. + /// The current update status of OneAgent. + /// The availability state of OneAgent. + /// Tells whether log modules are enabled or not. + /// The name of the host group. + /// The name of the host. + /// A new instance for mocking. + public static DynatraceMonitorVmInfo DynatraceMonitorVmInfo(ResourceIdentifier resourceId = null, string version = null, DynatraceOneAgentMonitoringType? monitoringType = null, DynatraceOneAgentAutoUpdateSetting? autoUpdateSetting = null, DynatraceOneAgentUpdateStatus? updateStatus = null, DynatraceOneAgentAvailabilityState? availabilityState = null, DynatraceLogModuleState? logModule = null, string hostGroup = null, string hostName = null) + { + return new DynatraceMonitorVmInfo(resourceId, version, monitoringType, autoUpdateSetting, updateStatus, availabilityState, logModule, hostGroup, hostName); + } + + /// Initializes a new instance of DynatraceOneAgentEnabledAppServiceInfo. + /// App service resource ID. + /// Version of the Dynatrace agent installed on the App Service. + /// The monitoring mode of OneAgent. + /// Update settings of OneAgent. + /// The current update status of OneAgent. + /// The availability state of OneAgent. + /// Tells whether log modules are enabled or not. + /// The name of the host group. + /// The name of the host. + /// A new instance for mocking. + public static DynatraceOneAgentEnabledAppServiceInfo DynatraceOneAgentEnabledAppServiceInfo(ResourceIdentifier resourceId = null, string version = null, DynatraceOneAgentMonitoringType? monitoringType = null, DynatraceOneAgentAutoUpdateSetting? autoUpdateSetting = null, DynatraceOneAgentUpdateStatus? updateStatus = null, DynatraceOneAgentAvailabilityState? availabilityState = null, DynatraceLogModuleState? logModule = null, string hostGroup = null, string hostName = null) + { + return new DynatraceOneAgentEnabledAppServiceInfo(resourceId, version, monitoringType, autoUpdateSetting, updateStatus, availabilityState, logModule, hostGroup, hostName); + } + + /// Initializes a new instance of DynatraceSsoDetailsResult. + /// Whether the SSO is enabled for this resource or not. + /// URL for Azure AD metadata. + /// The login URL specific to this Dynatrace Environment. + /// array of Aad(azure active directory) domains. + /// Array of admin user emails. + /// A new instance for mocking. + public static DynatraceSsoDetailsResult DynatraceSsoDetailsResult(DynatraceSsoStatus? isSsoEnabled = null, Uri metadataUri = null, Uri singleSignOnUri = null, IEnumerable aadDomains = null, IEnumerable adminUsers = null) + { + aadDomains ??= new List(); + adminUsers ??= new List(); + + return new DynatraceSsoDetailsResult(isSsoEnabled, metadataUri, singleSignOnUri, aadDomains?.ToList(), adminUsers?.ToList()); + } + + /// Initializes a new instance of LinkableEnvironmentResult. + /// environment id for which user is an admin. + /// Name of the environment. + /// Billing plan information. + /// A new instance for mocking. + public static LinkableEnvironmentResult LinkableEnvironmentResult(string environmentId = null, string environmentName = null, DynatraceBillingPlanInfo planData = null) + { + return new LinkableEnvironmentResult(environmentId, environmentName, planData); + } + } +} diff --git a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/autorest.md b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/autorest.md index 19952696c132..3088a1926f2d 100644 --- a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/autorest.md +++ b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/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: Dynatrace namespace: Azure.ResourceManager.Dynatrace