diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/Azure.Developer.LoadTesting.sln b/sdk/loadtesting/Azure.Developer.LoadTesting/Azure.Developer.LoadTesting.sln
new file mode 100644
index 000000000000..fb32820aaea6
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/Azure.Developer.LoadTesting.sln
@@ -0,0 +1,56 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29709.97
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Developer.LoadTesting", "src\Azure.Developer.LoadTesting.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Developer.LoadTesting.Tests", "tests\Azure.Developer.LoadTesting.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE}
+ EndGlobalSection
+EndGlobal
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/CHANGELOG.md b/sdk/loadtesting/Azure.Developer.LoadTesting/CHANGELOG.md
new file mode 100644
index 000000000000..8b33f0fedccc
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/CHANGELOG.md
@@ -0,0 +1,11 @@
+# Release History
+
+## 1.0.0-beta.1 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
\ No newline at end of file
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/Directory.Build.props b/sdk/loadtesting/Azure.Developer.LoadTesting/Directory.Build.props
new file mode 100644
index 000000000000..63bd836ad44b
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/Directory.Build.props
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/README.md b/sdk/loadtesting/Azure.Developer.LoadTesting/README.md
new file mode 100644
index 000000000000..09c7f0c5f2cd
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/README.md
@@ -0,0 +1,107 @@
+# Azure.Developer.LoadTesting client library for .NET
+
+Azure.Developer.LoadTesting is a managed service that helps developers get secret simply and securely.
+
+Use the client library for to:
+
+* [Get secret](https://docs.microsoft.com/azure)
+
+[Source code][source_root] | [Package (NuGet)][package] | [API reference documentation][reference_docs] | [Product documentation][azconfig_docs] | [Samples][source_samples]
+
+ [Source code](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/loadtesting/Azure.Developer.LoadTesting/src) | [Package (NuGet)](https://www.nuget.org/packages) | [API reference documentation](https://azure.github.io/azure-sdk-for-net) | [Product documentation](https://docs.microsoft.com/azure)
+
+## Getting started
+
+This section should include everything a developer needs to do to install and create their first client connection *very quickly*.
+
+### Install the package
+
+First, provide instruction for obtaining and installing the package or library. This section might include only a single line of code, like `dotnet add package package-name`, but should enable a developer to successfully install the package from NuGet, npm, or even cloning a GitHub repository.
+
+Install the client library for .NET with [NuGet](https://www.nuget.org/ ):
+
+```dotnetcli
+dotnet add package Azure.Developer.LoadTesting --prerelease
+```
+
+### Prerequisites
+
+Include a section after the install command that details any requirements that must be satisfied before a developer can [authenticate](#authenticate-the-client) and test all of the snippets in the [Examples](#examples) section. For example, for Cosmos DB:
+
+> You must have an [Azure subscription](https://azure.microsoft.com/free/dotnet/) and [Cosmos DB account](https://docs.microsoft.com/azure/cosmos-db/account-overview) (SQL API). In order to take advantage of the C# 8.0 syntax, it is recommended that you compile using the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher with a [language version](https://docs.microsoft.com/dotnet/csharp/language-reference/configure-language-version#override-a-default) of `latest`. It is also possible to compile with the .NET Core SDK 2.1.x using a language version of `preview`.
+
+### Authenticate the client
+
+If your library requires authentication for use, such as for Azure services, include instructions and example code needed for initializing and authenticating.
+
+For example, include details on obtaining an account key and endpoint URI, setting environment variables for each, and initializing the client object.
+
+### Service API versions
+
+The client library targets the latest service API version by default. A client instance accepts an optional service API version parameter from its options to specify which API version service to communicate.
+
+#### Select a service API version
+
+You have the flexibility to explicitly select a supported service API version when instantiating a client by configuring its associated options. This ensures that the client can communicate with services using the specified API version.
+
+For example,
+
+```C# Snippet:CreateClientForSpecificApiVersion
+Uri endpoint = new Uri("");
+DefaultAzureCredential credential = new DefaultAzureCredential();
+ClientOptions options = new ClientOptions(ClientOptions.ServiceVersion.)
+var client = new Client(endpoint, credential, options);
+```
+
+When selecting an API version, it's important to verify that there are no breaking changes compared to the latest API version. If there are significant differences, API calls may fail due to incompatibility.
+
+Always ensure that the chosen API version is fully supported and operational for your specific use case and that it aligns with the service's versioning policy.
+
+## Key concepts
+
+The *Key concepts* section should describe the functionality of the main classes. Point out the most important and useful classes in the package (with links to their reference pages) and explain how those classes work together. Feel free to use bulleted lists, tables, code blocks, or even diagrams for clarity.
+
+Include the *Thread safety* and *Additional concepts* sections below at the end of your *Key concepts* section. You may remove or add links depending on what your library makes use of:
+
+### Thread safety
+
+We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads.
+
+### Additional concepts
+
+[Client options](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#configuring-service-clients-using-clientoptions) |
+[Accessing the response](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#accessing-http-response-details-using-responset) |
+[Long-running operations](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#consuming-long-running-operations-using-operationt) |
+[Handling failures](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#reporting-errors-requestfailedexception) |
+[Diagnostics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md) |
+[Mocking](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#mocking) |
+[Client lifetime](https://devblogs.microsoft.com/azure-sdk/lifetime-management-and-thread-safety-guarantees-of-azure-sdk-net-clients/)
+
+
+## Examples
+
+You can familiarize yourself with different APIs using [Samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/loadtesting/Azure.Developer.LoadTesting/samples).
+
+## Troubleshooting
+
+Describe common errors and exceptions, how to "unpack" them if necessary, and include guidance for graceful handling and recovery.
+
+Provide information to help developers avoid throttling or other service-enforced errors they might encounter. For example, provide guidance and examples for using retry or connection policies in the API.
+
+If the package or a related package supports it, include tips for logging or enabling instrumentation to help them debug their code.
+
+## Next steps
+
+* Provide a link to additional code examples, ideally to those sitting alongside the README in the package's `/samples` directory.
+* If appropriate, point users to other packages that might be useful.
+* If you think there's a good chance that developers might stumble across your package in error (because they're searching for specific functionality and mistakenly think the package provides that functionality), point them to the packages they might be looking for.
+
+## Contributing
+
+This is a template, but your SDK readme should include details on how to contribute code to the repo/package.
+
+
+[style-guide-msft]: https://docs.microsoft.com/style-guide/capitalization
+[style-guide-cloud]: https://aka.ms/azsdk/cloud-style-guide
+
+
\ No newline at end of file
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Azure.Developer.LoadTesting.csproj b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Azure.Developer.LoadTesting.csproj
new file mode 100644
index 000000000000..e46421196dcf
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Azure.Developer.LoadTesting.csproj
@@ -0,0 +1,19 @@
+
+
+ This is the Azure.Developer.LoadTesting client library for developing .NET applications with rich experience.
+ Azure SDK Code Generation Azure.Developer.LoadTesting for Azure Data Plane
+ 1.0.0-beta.1
+ Azure.Developer.LoadTesting
+ $(RequiredTargetFrameworks)
+ true
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/AggregationType.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/AggregationType.cs
new file mode 100644
index 000000000000..76917e3b3797
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/AggregationType.cs
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.Developer.LoadTesting
+{
+ /// Aggregation type.
+ public readonly partial struct AggregationType : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public AggregationType(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string AverageValue = "Average";
+ private const string CountValue = "Count";
+ private const string NoneValue = "None";
+ private const string TotalValue = "Total";
+ private const string Percentile75Value = "Percentile75";
+ private const string Percentile90Value = "Percentile90";
+ private const string Percentile95Value = "Percentile95";
+ private const string Percentile96Value = "Percentile96";
+ private const string Percentile97Value = "Percentile97";
+ private const string Percentile98Value = "Percentile98";
+ private const string Percentile99Value = "Percentile99";
+ private const string Percentile999Value = "Percentile999";
+ private const string Percentile9999Value = "Percentile9999";
+
+ /// Average value.
+ public static AggregationType Average { get; } = new AggregationType(AverageValue);
+ /// Total count.
+ public static AggregationType Count { get; } = new AggregationType(CountValue);
+ /// Aggregation will be average in this case.
+ public static AggregationType None { get; } = new AggregationType(NoneValue);
+ /// Total sum.
+ public static AggregationType Total { get; } = new AggregationType(TotalValue);
+ /// 75th percentile.
+ public static AggregationType Percentile75 { get; } = new AggregationType(Percentile75Value);
+ /// 90th percentile.
+ public static AggregationType Percentile90 { get; } = new AggregationType(Percentile90Value);
+ /// 95th percentile.
+ public static AggregationType Percentile95 { get; } = new AggregationType(Percentile95Value);
+ /// 96th percentile.
+ public static AggregationType Percentile96 { get; } = new AggregationType(Percentile96Value);
+ /// 97th percentile.
+ public static AggregationType Percentile97 { get; } = new AggregationType(Percentile97Value);
+ /// 98th percentile.
+ public static AggregationType Percentile98 { get; } = new AggregationType(Percentile98Value);
+ /// 99th percentile.
+ public static AggregationType Percentile99 { get; } = new AggregationType(Percentile99Value);
+ /// 99.9th percentile.
+ public static AggregationType Percentile999 { get; } = new AggregationType(Percentile999Value);
+ /// 99.99th percentile.
+ public static AggregationType Percentile9999 { get; } = new AggregationType(Percentile9999Value);
+ /// Determines if two values are the same.
+ public static bool operator ==(AggregationType left, AggregationType right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(AggregationType left, AggregationType right) => !left.Equals(right);
+ /// Converts a to a .
+ public static implicit operator AggregationType(string value) => new AggregationType(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is AggregationType other && Equals(other);
+ ///
+ public bool Equals(AggregationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/ArtifactsContainerInfo.Serialization.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/ArtifactsContainerInfo.Serialization.cs
new file mode 100644
index 000000000000..ccdf31a21bfe
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/ArtifactsContainerInfo.Serialization.cs
@@ -0,0 +1,164 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Developer.LoadTesting
+{
+ public partial class ArtifactsContainerInfo : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(ArtifactsContainerInfo)} does not support writing '{format}' format.");
+ }
+
+ if (Optional.IsDefined(Uri))
+ {
+ writer.WritePropertyName("url"u8);
+ writer.WriteStringValue(Uri.AbsoluteUri);
+ }
+ if (Optional.IsDefined(ExpiresOn))
+ {
+ writer.WritePropertyName("expireDateTime"u8);
+ writer.WriteStringValue(ExpiresOn.Value, "O");
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ ArtifactsContainerInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(ArtifactsContainerInfo)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeArtifactsContainerInfo(document.RootElement, options);
+ }
+
+ internal static ArtifactsContainerInfo DeserializeArtifactsContainerInfo(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Uri url = default;
+ DateTimeOffset? expireDateTime = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("url"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ url = new Uri(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("expireDateTime"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ expireDateTime = property.Value.GetDateTimeOffset("O");
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new ArtifactsContainerInfo(url, expireDateTime, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(ArtifactsContainerInfo)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ ArtifactsContainerInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeArtifactsContainerInfo(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(ArtifactsContainerInfo)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static ArtifactsContainerInfo FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeArtifactsContainerInfo(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/ArtifactsContainerInfo.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/ArtifactsContainerInfo.cs
new file mode 100644
index 000000000000..6c3025c73388
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/ArtifactsContainerInfo.cs
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.Developer.LoadTesting
+{
+ /// Artifacts container info.
+ public partial class ArtifactsContainerInfo
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ internal ArtifactsContainerInfo()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// This is a SAS URI to an Azure Storage Container that contains the test run artifacts.
+ /// Expiry time of the container (RFC 3339 literal format).
+ /// Keeps track of any properties unknown to the library.
+ internal ArtifactsContainerInfo(Uri uri, DateTimeOffset? expiresOn, IDictionary serializedAdditionalRawData)
+ {
+ Uri = uri;
+ ExpiresOn = expiresOn;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// This is a SAS URI to an Azure Storage Container that contains the test run artifacts.
+ public Uri Uri { get; }
+ /// Expiry time of the container (RFC 3339 literal format).
+ public DateTimeOffset? ExpiresOn { get; }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/AutoStopCriteria.Serialization.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/AutoStopCriteria.Serialization.cs
new file mode 100644
index 000000000000..f5757e2ba134
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/AutoStopCriteria.Serialization.cs
@@ -0,0 +1,179 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Developer.LoadTesting
+{
+ public partial class AutoStopCriteria : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AutoStopCriteria)} does not support writing '{format}' format.");
+ }
+
+ if (Optional.IsDefined(AutoStopDisabled))
+ {
+ writer.WritePropertyName("autoStopDisabled"u8);
+ writer.WriteBooleanValue(AutoStopDisabled.Value);
+ }
+ if (Optional.IsDefined(ErrorRate))
+ {
+ writer.WritePropertyName("errorRate"u8);
+ writer.WriteNumberValue(ErrorRate.Value);
+ }
+ if (Optional.IsDefined(ErrorRateTimeWindow))
+ {
+ writer.WritePropertyName("errorRateTimeWindowInSeconds"u8);
+ writer.WriteNumberValue(Convert.ToInt32(ErrorRateTimeWindow.Value.ToString("%s")));
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ AutoStopCriteria IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AutoStopCriteria)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAutoStopCriteria(document.RootElement, options);
+ }
+
+ internal static AutoStopCriteria DeserializeAutoStopCriteria(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ bool? autoStopDisabled = default;
+ float? errorRate = default;
+ TimeSpan? errorRateTimeWindowInSeconds = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("autoStopDisabled"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ autoStopDisabled = property.Value.GetBoolean();
+ continue;
+ }
+ if (property.NameEquals("errorRate"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ errorRate = property.Value.GetSingle();
+ continue;
+ }
+ if (property.NameEquals("errorRateTimeWindowInSeconds"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ errorRateTimeWindowInSeconds = TimeSpan.FromSeconds(property.Value.GetInt32());
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AutoStopCriteria(autoStopDisabled, errorRate, errorRateTimeWindowInSeconds, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(AutoStopCriteria)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AutoStopCriteria IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAutoStopCriteria(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AutoStopCriteria)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static AutoStopCriteria FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAutoStopCriteria(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/AutoStopCriteria.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/AutoStopCriteria.cs
new file mode 100644
index 000000000000..62add74aaf58
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/AutoStopCriteria.cs
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.Developer.LoadTesting
+{
+ /// Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window.
+ public partial class AutoStopCriteria
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ public AutoStopCriteria()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// Whether auto-stop should be disabled. The default value is false.
+ /// Threshold percentage of errors on which test run should be automatically stopped. Allowed values are in range of 0.0-100.0.
+ /// Time window during which the error percentage should be evaluated in seconds.
+ /// Keeps track of any properties unknown to the library.
+ internal AutoStopCriteria(bool? autoStopDisabled, float? errorRate, TimeSpan? errorRateTimeWindow, IDictionary serializedAdditionalRawData)
+ {
+ AutoStopDisabled = autoStopDisabled;
+ ErrorRate = errorRate;
+ ErrorRateTimeWindow = errorRateTimeWindow;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Whether auto-stop should be disabled. The default value is false.
+ public bool? AutoStopDisabled { get; set; }
+ /// Threshold percentage of errors on which test run should be automatically stopped. Allowed values are in range of 0.0-100.0.
+ public float? ErrorRate { get; set; }
+ /// Time window during which the error percentage should be evaluated in seconds.
+ public TimeSpan? ErrorRateTimeWindow { get; set; }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/AzureDeveloperLoadTestingClientOptions.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/AzureDeveloperLoadTestingClientOptions.cs
new file mode 100644
index 000000000000..182a9afccf68
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/AzureDeveloperLoadTestingClientOptions.cs
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using Azure.Core;
+
+namespace Azure.Developer.LoadTesting
+{
+ /// Client options for Azure.Developer.LoadTesting library clients.
+ public partial class AzureDeveloperLoadTestingClientOptions : ClientOptions
+ {
+ private const ServiceVersion LatestVersion = ServiceVersion.V2024_12_01_Preview;
+
+ /// The version of the service to use.
+ public enum ServiceVersion
+ {
+ /// Service version "2022-11-01".
+ V2022_11_01 = 1,
+ /// Service version "2023-04-01-preview".
+ V2023_04_01_Preview = 2,
+ /// Service version "2024-03-01-preview".
+ V2024_03_01_Preview = 3,
+ /// Service version "2024-05-01-preview".
+ V2024_05_01_Preview = 4,
+ /// Service version "2024-07-01-preview".
+ V2024_07_01_Preview = 5,
+ /// Service version "2024-12-01-preview".
+ V2024_12_01_Preview = 6,
+ }
+
+ internal string Version { get; }
+
+ /// Initializes new instance of AzureDeveloperLoadTestingClientOptions.
+ public AzureDeveloperLoadTestingClientOptions(ServiceVersion version = LatestVersion)
+ {
+ Version = version switch
+ {
+ ServiceVersion.V2022_11_01 => "2022-11-01",
+ ServiceVersion.V2023_04_01_Preview => "2023-04-01-preview",
+ ServiceVersion.V2024_03_01_Preview => "2024-03-01-preview",
+ ServiceVersion.V2024_05_01_Preview => "2024-05-01-preview",
+ ServiceVersion.V2024_07_01_Preview => "2024-07-01-preview",
+ ServiceVersion.V2024_12_01_Preview => "2024-12-01-preview",
+ _ => throw new NotSupportedException()
+ };
+ }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/CertificateType.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/CertificateType.cs
new file mode 100644
index 000000000000..2d4b2cc0ea64
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/CertificateType.cs
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.Developer.LoadTesting
+{
+ /// Types of certificates supported.
+ public readonly partial struct CertificateType : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public CertificateType(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string KeyVaultCertificateUriValue = "AKV_CERT_URI";
+
+ /// If the certificate is stored in an Azure Key Vault.
+ public static CertificateType KeyVaultCertificateUri { get; } = new CertificateType(KeyVaultCertificateUriValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(CertificateType left, CertificateType right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(CertificateType left, CertificateType right) => !left.Equals(right);
+ /// Converts a to a .
+ public static implicit operator CertificateType(string value) => new CertificateType(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is CertificateType other && Equals(other);
+ ///
+ public bool Equals(CertificateType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/CreatedByType.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/CreatedByType.cs
new file mode 100644
index 000000000000..07698168cca2
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/CreatedByType.cs
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.Developer.LoadTesting
+{
+ /// The type of the entity that created the test run. (E.x. User, ScheduleTrigger, etc).
+ public readonly partial struct CreatedByType : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public CreatedByType(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string UserValue = "User";
+ private const string ScheduledTriggerValue = "ScheduledTrigger";
+
+ /// Entity was created by a user.
+ public static CreatedByType User { get; } = new CreatedByType(UserValue);
+ /// Entity was created by a scheduled trigger.
+ public static CreatedByType ScheduledTrigger { get; } = new CreatedByType(ScheduledTriggerValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(CreatedByType left, CreatedByType right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(CreatedByType left, CreatedByType right) => !left.Equals(right);
+ /// Converts a to a .
+ public static implicit operator CreatedByType(string value) => new CreatedByType(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is CreatedByType other && Equals(other);
+ ///
+ public bool Equals(CreatedByType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/DeveloperLoadTestingClientBuilderExtensions.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/DeveloperLoadTestingClientBuilderExtensions.cs
new file mode 100644
index 000000000000..6d76257f95b6
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/DeveloperLoadTestingClientBuilderExtensions.cs
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using Azure.Core.Extensions;
+using Azure.Developer.LoadTesting;
+
+namespace Microsoft.Extensions.Azure
+{
+ /// Extension methods to add , to client builder.
+ public static partial class DeveloperLoadTestingClientBuilderExtensions
+ {
+ /// Registers a instance.
+ /// The builder to register with.
+ /// The to use.
+ public static IAzureClientBuilder AddLoadTestAdministrationClient(this TBuilder builder, Uri endpoint)
+ where TBuilder : IAzureClientFactoryBuilderWithCredential
+ {
+ return builder.RegisterClientFactory((options, cred) => new LoadTestAdministrationClient(endpoint, cred, options));
+ }
+
+ /// Registers a instance.
+ /// The builder to register with.
+ /// The to use.
+ public static IAzureClientBuilder AddLoadTestRunClient(this TBuilder builder, Uri endpoint)
+ where TBuilder : IAzureClientFactoryBuilderWithCredential
+ {
+ return builder.RegisterClientFactory((options, cred) => new LoadTestRunClient(endpoint, cred, options));
+ }
+
+ /// Registers a instance.
+ /// The builder to register with.
+ /// The configuration values.
+ public static IAzureClientBuilder AddLoadTestAdministrationClient(this TBuilder builder, TConfiguration configuration)
+ where TBuilder : IAzureClientFactoryBuilderWithConfiguration
+ {
+ return builder.RegisterClientFactory(configuration);
+ }
+ /// Registers a instance.
+ /// The builder to register with.
+ /// The configuration values.
+ public static IAzureClientBuilder AddLoadTestRunClient(this TBuilder builder, TConfiguration configuration)
+ where TBuilder : IAzureClientFactoryBuilderWithConfiguration
+ {
+ return builder.RegisterClientFactory(configuration);
+ }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/DeveloperLoadTestingModelFactory.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/DeveloperLoadTestingModelFactory.cs
new file mode 100644
index 000000000000..87493a806840
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/DeveloperLoadTestingModelFactory.cs
@@ -0,0 +1,773 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Azure.Core;
+
+namespace Azure.Developer.LoadTesting
+{
+ /// Model factory for models.
+ public static partial class DeveloperLoadTestingModelFactory
+ {
+ /// Initializes a new instance of .
+ /// Pass fail criteria for a test.
+ /// Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window.
+ ///
+ /// Secrets can be stored in an Azure Key Vault or any other secret store. If the
+ /// secret is stored in an Azure Key Vault, the value should be the secret
+ /// identifier and the type should be AKV_SECRET_URI. If the secret is stored
+ /// elsewhere, the secret value should be provided directly and the type should be
+ /// SECRET_VALUE.
+ ///
+ /// Certificates metadata.
+ /// Environment variables which are defined as a set of <name,value> pairs.
+ /// The load test configuration.
+ /// Id of the test run to be marked as baseline to view trends of client-side metrics from recent test runs.
+ /// The input artifacts for the test.
+ /// Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.
+ /// The test description.
+ /// Display name of a test.
+ /// Subnet ID on which the load test instances should run.
+ /// Kind of test.
+ /// Inject load test engines without deploying public IP for outbound access.
+ /// Type of the managed identity referencing the Key vault.
+ /// Resource Id of the managed identity referencing the Key vault.
+ /// Type of the managed identity referencing the metrics.
+ /// Resource Id of the managed identity referencing the metrics.
+ /// Type of the managed identity built in load test engines.
+ /// Resource Ids of the managed identity built in to load test engines. Required if engineBuiltInIdentityType is UserAssigned.
+ /// The creation datetime(RFC 3339 literal format).
+ /// The user that created.
+ /// The last Modified datetime(RFC 3339 literal format).
+ /// The user that last modified.
+ /// A new instance for mocking.
+ public static LoadTest LoadTest(PassFailCriteria passFailCriteria = null, AutoStopCriteria autoStopCriteria = null, IDictionary secrets = null, TestCertificate certificate = null, IDictionary environmentVariables = null, LoadTestConfiguration loadTestConfiguration = null, string baselineTestRunId = null, TestInputArtifacts inputArtifacts = null, string testId = null, string description = null, string displayName = null, string subnetId = null, LoadTestKind? kind = null, bool? publicIpDisabled = null, string keyvaultReferenceIdentityType = null, string keyvaultReferenceIdentityId = null, LoadTestingManagedIdentityType? metricsReferenceIdentityType = null, string metricsReferenceIdentityId = null, LoadTestingManagedIdentityType? engineBuiltInIdentityType = null, IEnumerable engineBuiltInIdentityIds = null, DateTimeOffset? createdDateTime = null, string createdBy = null, DateTimeOffset? lastModifiedDateTime = null, string lastModifiedBy = null)
+ {
+ secrets ??= new Dictionary();
+ environmentVariables ??= new Dictionary();
+ engineBuiltInIdentityIds ??= new List();
+
+ return new LoadTest(
+ passFailCriteria,
+ autoStopCriteria,
+ secrets,
+ certificate,
+ environmentVariables,
+ loadTestConfiguration,
+ baselineTestRunId,
+ inputArtifacts,
+ testId,
+ description,
+ displayName,
+ subnetId,
+ kind,
+ publicIpDisabled,
+ keyvaultReferenceIdentityType,
+ keyvaultReferenceIdentityId,
+ metricsReferenceIdentityType,
+ metricsReferenceIdentityId,
+ engineBuiltInIdentityType,
+ engineBuiltInIdentityIds?.ToList(),
+ createdDateTime,
+ createdBy,
+ lastModifiedDateTime,
+ lastModifiedBy,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The client metric on which the criteria should be applied.
+ ///
+ /// The aggregation function to be applied on the client metric. Allowed functions
+ /// - ‘percentage’ - for error metric , ‘avg’, percentiles like ‘p50’, ‘p90’, & so on, ‘min’,
+ /// ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec,
+ /// ‘count’ - for requests
+ ///
+ /// The comparison operator. Supported types ‘>’, ‘<’.
+ /// Request name for which the Pass fail criteria has to be applied.
+ ///
+ /// The value to compare with the client metric. Allowed values - ‘error : [0.0 ,
+ /// 100.0] unit- % ’, response_time_ms and latency : any integer value unit- ms.
+ ///
+ /// Action taken after the threshold is met. Default is ‘continue’.
+ /// The actual value of the client metric for the test run.
+ /// Outcome of the test run.
+ /// A new instance for mocking.
+ public static PassFailMetric PassFailMetric(PfMetrics? clientMetric = null, PassFailAggregationFunction? aggregate = null, string condition = null, string requestName = null, double? value = null, PassFailAction? action = null, double? actualValue = null, PassFailResult? result = null)
+ {
+ return new PassFailMetric(
+ clientMetric,
+ aggregate,
+ condition,
+ requestName,
+ value,
+ action,
+ actualValue,
+ result,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The resource id of the resource emitting the metric.
+ /// The server metric namespace.
+ /// The server metric name.
+ /// Aggregation Type.
+ /// The comparison operator. Supported types ‘>’, ‘<’.
+ /// The value to compare with the server metric.
+ /// Action taken after the threshold is met. Default is ‘continue’.
+ /// The actual value of the server metric.
+ /// Outcome of the test run.
+ /// A new instance for mocking.
+ public static PassFailServerMetric PassFailServerMetric(ResourceIdentifier resourceId = null, string metricNamespace = null, string metricName = null, string aggregation = null, string condition = null, double value = default, PassFailAction? action = null, double? actualValue = null, PassFailResult? result = null)
+ {
+ return new PassFailServerMetric(
+ resourceId,
+ metricNamespace,
+ metricName,
+ aggregation,
+ condition,
+ value,
+ action,
+ actualValue,
+ result,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The load test YAML file that contains the the test configuration.
+ /// The test script file for the test run.
+ /// The user properties file.
+ /// The zip file with all input artifacts.
+ /// The config json file for url based test.
+ /// Additional supported files for the test run.
+ /// A new instance for mocking.
+ public static TestInputArtifacts TestInputArtifacts(TestFileInfo configFileInfo = null, TestFileInfo testScriptFileInfo = null, TestFileInfo userPropertyFileInfo = null, TestFileInfo inputArtifactsZipFileInfo = null, TestFileInfo urlTestConfigFileInfo = null, IEnumerable additionalFileInfo = null)
+ {
+ additionalFileInfo ??= new List();
+
+ return new TestInputArtifacts(
+ configFileInfo,
+ testScriptFileInfo,
+ userPropertyFileInfo,
+ inputArtifactsZipFileInfo,
+ urlTestConfigFileInfo,
+ additionalFileInfo?.ToList(),
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Name of the file.
+ /// File URL.
+ /// File type.
+ /// Expiry time of the file (RFC 3339 literal format).
+ /// Validation status of the file.
+ /// Validation failure error details.
+ /// A new instance for mocking.
+ public static TestFileInfo TestFileInfo(string fileName = null, Uri uri = null, LoadTestingFileType? fileType = null, DateTimeOffset? expiresOn = null, FileValidationStatus? validationStatus = null, string validationFailureDetails = null)
+ {
+ return new TestFileInfo(
+ fileName,
+ uri,
+ fileType,
+ expiresOn,
+ validationStatus,
+ validationFailureDetails,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// Azure resource collection { resource id (fully qualified resource Id e.g
+ /// subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName})
+ /// : resource object }
+ ///
+ /// Test identifier.
+ /// The creation datetime(RFC 3339 literal format).
+ /// The user that created.
+ /// The last Modified datetime(RFC 3339 literal format).
+ /// The user that last modified.
+ /// A new instance for mocking.
+ public static TestAppComponents TestAppComponents(IDictionary components = null, string testId = null, DateTimeOffset? createdDateTime = null, string createdBy = null, DateTimeOffset? lastModifiedDateTime = null, string lastModifiedBy = null)
+ {
+ components ??= new Dictionary();
+
+ return new TestAppComponents(
+ components,
+ testId,
+ createdDateTime,
+ createdBy,
+ lastModifiedDateTime,
+ lastModifiedBy,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}.
+ /// Azure resource name, required while creating the app component.
+ /// Azure resource type, required while creating the app component.
+ /// Azure resource display name.
+ /// Resource group name of the Azure resource.
+ /// Subscription Id of the Azure resource.
+ /// Kind of Azure resource type.
+ /// A new instance for mocking.
+ public static LoadTestingAppComponent LoadTestingAppComponent(ResourceIdentifier resourceId = null, string resourceName = null, string resourceType = null, string displayName = null, string resourceGroup = null, string subscriptionId = null, string kind = null)
+ {
+ return new LoadTestingAppComponent(
+ resourceId,
+ resourceName,
+ resourceType,
+ displayName,
+ resourceGroup,
+ subscriptionId,
+ kind,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Test identifier.
+ ///
+ /// Azure resource metrics collection {metric id : metrics object} (Refer :
+ /// https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition
+ /// for metric id).
+ ///
+ /// The creation datetime(RFC 3339 literal format).
+ /// The user that created.
+ /// The last Modified datetime(RFC 3339 literal format).
+ /// The user that last modified.
+ /// A new instance for mocking.
+ public static TestServerMetricsConfiguration TestServerMetricsConfiguration(string testId = null, IDictionary metrics = null, DateTimeOffset? createdDateTime = null, string createdBy = null, DateTimeOffset? lastModifiedDateTime = null, string lastModifiedBy = null)
+ {
+ metrics ??= new Dictionary();
+
+ return new TestServerMetricsConfiguration(
+ testId,
+ metrics,
+ createdDateTime,
+ createdBy,
+ lastModifiedDateTime,
+ lastModifiedBy,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Unique name for metric.
+ /// Azure resource id.
+ /// Metric name space.
+ /// Metric description.
+ /// The invariant value of metric name.
+ /// Metric aggregation.
+ /// Metric unit.
+ /// Azure resource type.
+ /// A new instance for mocking.
+ public static ResourceMetric ResourceMetric(string id = null, ResourceIdentifier resourceId = null, string metricNamespace = null, string displayDescription = null, string name = null, string aggregation = null, string unit = null, string resourceType = null)
+ {
+ return new ResourceMetric(
+ id,
+ resourceId,
+ metricNamespace,
+ displayDescription,
+ name,
+ aggregation,
+ unit,
+ resourceType,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.
+ /// Display name of the test profile.
+ /// Description for the test profile.
+ /// Associated test ID for the test profile. This property is required for creating a Test Profile and it's not allowed to be updated.
+ /// Target resource ID on which the test profile is created. This property is required for creating a Test Profile and it's not allowed to be updated.
+ ///
+ /// Configurations of the target resource on which testing would be done.
+ /// 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 .
+ ///
+ /// The creation datetime(RFC 3339 literal format).
+ /// The user that created.
+ /// The last Modified datetime(RFC 3339 literal format).
+ /// The user that last modified.
+ /// A new instance for mocking.
+ public static TestProfile TestProfile(string testProfileId = null, string displayName = null, string description = null, string testId = null, ResourceIdentifier targetResourceId = null, TargetResourceConfigurations targetResourceConfigurations = null, DateTimeOffset? createdDateTime = null, string createdBy = null, DateTimeOffset? lastModifiedDateTime = null, string lastModifiedBy = null)
+ {
+ return new TestProfile(
+ testProfileId,
+ displayName,
+ description,
+ testId,
+ targetResourceId,
+ targetResourceConfigurations,
+ createdDateTime,
+ createdBy,
+ lastModifiedDateTime,
+ lastModifiedBy,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Unique test run identifier for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.
+ /// Pass fail criteria for a test.
+ /// Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window.
+ ///
+ /// Secrets can be stored in an Azure Key Vault or any other secret store. If the
+ /// secret is stored in an Azure Key Vault, the value should be the secret
+ /// identifier and the type should be AKV_SECRET_URI. If the secret is stored
+ /// elsewhere, the secret value should be provided directly and the type should be
+ /// SECRET_VALUE.
+ ///
+ /// Certificates metadata.
+ /// Environment variables which are defined as a set of <name,value> pairs.
+ /// Error details if there is any failure in load test run.
+ ///
+ /// Test run statistics. Key is the sampler name and value is the set of statistics for performance metrics like response time, throughput, etc. from the load test run.
+ /// The sampler name is the same as the name mentioned in the test script.
+ /// Sampler name "Total" represents the aggregated statistics of all the samplers.
+ ///
+ ///
+ /// Regional statistics. Key is the Azure region name and value is the test run statistics.
+ /// The region name should of format accepted by ARM, and should be a region supported by Azure Load Testing. For example, East US should be passed as "eastus".
+ /// The region name must match one of the strings in the "Name" column returned from running the "az account list-locations -o table" Azure CLI command.
+ ///
+ /// The load test configuration.
+ /// Collection of test run artifacts.
+ /// Test result for pass/Fail criteria used during the test run.
+ /// Number of virtual users, for which test has been run.
+ /// Display name of a testRun.
+ /// Associated test Id.
+ /// The test run description.
+ /// The test run status.
+ /// The test run start DateTime(RFC 3339 literal format).
+ /// The test run end DateTime(RFC 3339 literal format).
+ /// Test run initiated time.
+ /// Portal url.
+ /// Test run duration in milliseconds.
+ /// Virtual user hours consumed by the test run.
+ /// Subnet ID on which the load test instances should run.
+ /// Type of test.
+ /// Request data collection level for test run.
+ /// Enable or disable debug level logging. True if debug logs are enabled for the test run. False otherwise.
+ /// Inject load test engines without deploying public IP for outbound access.
+ /// The type of the entity that created the test run. (E.x. User, ScheduleTrigger, etc).
+ /// The creation datetime(RFC 3339 literal format).
+ /// The user that created.
+ /// The last Modified datetime(RFC 3339 literal format).
+ /// The user that last modified.
+ /// A new instance for mocking.
+ public static LoadTestRun LoadTestRun(string testRunId = null, PassFailCriteria passFailCriteria = null, AutoStopCriteria autoStopCriteria = null, IDictionary secrets = null, TestCertificate certificate = null, IDictionary environmentVariables = null, IEnumerable errorDetails = null, IReadOnlyDictionary testRunStatistics = null, IReadOnlyDictionary regionalStatistics = null, LoadTestConfiguration loadTestConfiguration = null, TestRunArtifacts testArtifacts = null, PassFailTestResult? testResult = null, int? virtualUsers = null, string displayName = null, string testId = null, string description = null, TestRunStatus? status = null, DateTimeOffset? startDateTime = null, DateTimeOffset? endDateTime = null, DateTimeOffset? executedDateTime = null, Uri portalUri = null, long? duration = null, double? virtualUserHours = null, string subnetId = null, LoadTestKind? kind = null, RequestDataLevel? requestDataLevel = null, bool? debugLogsEnabled = null, bool? publicIpDisabled = null, CreatedByType? createdByType = null, DateTimeOffset? createdDateTime = null, string createdBy = null, DateTimeOffset? lastModifiedDateTime = null, string lastModifiedBy = null)
+ {
+ secrets ??= new Dictionary();
+ environmentVariables ??= new Dictionary();
+ errorDetails ??= new List();
+ testRunStatistics ??= new Dictionary();
+ regionalStatistics ??= new Dictionary();
+
+ return new LoadTestRun(
+ testRunId,
+ passFailCriteria,
+ autoStopCriteria,
+ secrets,
+ certificate,
+ environmentVariables,
+ errorDetails?.ToList(),
+ testRunStatistics,
+ regionalStatistics,
+ loadTestConfiguration,
+ testArtifacts,
+ testResult,
+ virtualUsers,
+ displayName,
+ testId,
+ description,
+ status,
+ startDateTime,
+ endDateTime,
+ executedDateTime,
+ portalUri,
+ duration,
+ virtualUserHours,
+ subnetId,
+ kind,
+ requestDataLevel,
+ debugLogsEnabled,
+ publicIpDisabled,
+ createdByType,
+ createdDateTime,
+ createdBy,
+ lastModifiedDateTime,
+ lastModifiedBy,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Error details in case test run was not successfully run.
+ /// A new instance for mocking.
+ public static ErrorDetails ErrorDetails(string message = null)
+ {
+ return new ErrorDetails(message, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Transaction name.
+ /// Sampler count.
+ /// Error count.
+ /// Error percentage.
+ /// Mean response time.
+ /// Median response time.
+ /// Max response time.
+ /// Minimum response time.
+ /// 90 percentile response time.
+ /// 95 percentile response time.
+ /// 99 percentile response time.
+ /// 75 percentile response time.
+ /// 96 percentile response time.
+ /// 97 percentile response time.
+ /// 98 percentile response time.
+ /// 99.9 percentile response time.
+ /// 99.99 percentile response time.
+ /// Throughput.
+ /// Received network bytes.
+ /// Send network bytes.
+ /// A new instance for mocking.
+ public static TestRunStatistics TestRunStatistics(string transaction = null, double? sampleCount = null, double? errorCount = null, double? errorPercentage = null, double? meanResponseTime = null, double? medianResponseTime = null, double? maxResponseTime = null, double? minResponseTime = null, double? percentile90ResponseTime = null, double? percentile95ResponseTime = null, double? percentile99ResponseTime = null, double? percentile75ResponseTime = null, double? percentile96ResponseTime = null, double? percentile97ResponseTime = null, double? percentile98ResponseTime = null, double? percentile999ResponseTime = null, double? percentile9999ResponseTime = null, double? throughput = null, double? receivedKBytesPerSec = null, double? sentKBytesPerSec = null)
+ {
+ return new TestRunStatistics(
+ transaction,
+ sampleCount,
+ errorCount,
+ errorPercentage,
+ meanResponseTime,
+ medianResponseTime,
+ maxResponseTime,
+ minResponseTime,
+ percentile90ResponseTime,
+ percentile95ResponseTime,
+ percentile99ResponseTime,
+ percentile75ResponseTime,
+ percentile96ResponseTime,
+ percentile97ResponseTime,
+ percentile98ResponseTime,
+ percentile999ResponseTime,
+ percentile9999ResponseTime,
+ throughput,
+ receivedKBytesPerSec,
+ sentKBytesPerSec,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The input artifacts for the test run.
+ /// The output artifacts for the test run.
+ /// A new instance for mocking.
+ public static TestRunArtifacts TestRunArtifacts(TestRunInputArtifacts inputArtifacts = null, TestRunOutputArtifacts outputArtifacts = null)
+ {
+ return new TestRunArtifacts(inputArtifacts, outputArtifacts, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The load test YAML file that contains the the test configuration.
+ /// The test script file for the test run.
+ /// The user properties file.
+ /// The zip file for all input artifacts.
+ /// The config json file for url based test.
+ /// Additional supported files for the test run.
+ /// A new instance for mocking.
+ public static TestRunInputArtifacts TestRunInputArtifacts(TestRunFileInfo configFileInfo = null, TestRunFileInfo testScriptFileInfo = null, TestRunFileInfo userPropertyFileInfo = null, TestRunFileInfo inputArtifactsZipFileInfo = null, TestRunFileInfo urlTestConfigFileInfo = null, IEnumerable additionalFileInfo = null)
+ {
+ additionalFileInfo ??= new List();
+
+ return new TestRunInputArtifacts(
+ configFileInfo,
+ testScriptFileInfo,
+ userPropertyFileInfo,
+ inputArtifactsZipFileInfo,
+ urlTestConfigFileInfo,
+ additionalFileInfo?.ToList(),
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Name of the file.
+ /// File URL.
+ /// File type.
+ /// Expiry time of the file (RFC 3339 literal format).
+ /// Validation status of the file.
+ /// Validation failure error details.
+ /// A new instance for mocking.
+ public static TestRunFileInfo TestRunFileInfo(string fileName = null, Uri uri = null, LoadTestingFileType? fileType = null, DateTimeOffset? expiresOn = null, FileValidationStatus? validationStatus = null, string validationFailureDetails = null)
+ {
+ return new TestRunFileInfo(
+ fileName,
+ uri,
+ fileType,
+ expiresOn,
+ validationStatus,
+ validationFailureDetails,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The test run results file.
+ /// The test run report with metrics.
+ /// The container for test run artifacts.
+ /// The report file for the test run.
+ /// A new instance for mocking.
+ public static TestRunOutputArtifacts TestRunOutputArtifacts(TestRunFileInfo resultFileInfo = null, TestRunFileInfo logsFileInfo = null, ArtifactsContainerInfo artifactsContainerInfo = null, TestRunFileInfo reportFileInfo = null)
+ {
+ return new TestRunOutputArtifacts(resultFileInfo, logsFileInfo, artifactsContainerInfo, reportFileInfo, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// This is a SAS URI to an Azure Storage Container that contains the test run artifacts.
+ /// Expiry time of the container (RFC 3339 literal format).
+ /// A new instance for mocking.
+ public static ArtifactsContainerInfo ArtifactsContainerInfo(Uri uri = null, DateTimeOffset? expiresOn = null)
+ {
+ return new ArtifactsContainerInfo(uri, expiresOn, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// Azure resource collection { resource id (fully qualified resource Id e.g
+ /// subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName})
+ /// : resource object }
+ ///
+ /// Test run identifier.
+ /// The creation datetime(RFC 3339 literal format).
+ /// The user that created.
+ /// The last Modified datetime(RFC 3339 literal format).
+ /// The user that last modified.
+ /// A new instance for mocking.
+ public static TestRunAppComponents TestRunAppComponents(IDictionary components = null, string testRunId = null, DateTimeOffset? createdDateTime = null, string createdBy = null, DateTimeOffset? lastModifiedDateTime = null, string lastModifiedBy = null)
+ {
+ components ??= new Dictionary();
+
+ return new TestRunAppComponents(
+ components,
+ testRunId,
+ createdDateTime,
+ createdBy,
+ lastModifiedDateTime,
+ lastModifiedBy,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Test run identifier.
+ ///
+ /// Azure resource metrics collection {metric id : metrics object} (Refer :
+ /// https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition
+ /// for metric id).
+ ///
+ /// The creation datetime(RFC 3339 literal format).
+ /// The user that created.
+ /// The last Modified datetime(RFC 3339 literal format).
+ /// The user that last modified.
+ /// A new instance for mocking.
+ public static TestRunServerMetricsConfiguration TestRunServerMetricsConfiguration(string testRunId = null, IDictionary metrics = null, DateTimeOffset? createdDateTime = null, string createdBy = null, DateTimeOffset? lastModifiedDateTime = null, string lastModifiedBy = null)
+ {
+ metrics ??= new Dictionary();
+
+ return new TestRunServerMetricsConfiguration(
+ testRunId,
+ metrics,
+ createdDateTime,
+ createdBy,
+ lastModifiedDateTime,
+ lastModifiedBy,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// the values for the metric definitions.
+ /// A new instance for mocking.
+ public static MetricDefinitions MetricDefinitions(IEnumerable value = null)
+ {
+ value ??= new List();
+
+ return new MetricDefinitions(value?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// List of dimensions.
+ /// The metric description.
+ /// The metric name.
+ /// The namespace the metric belongs to.
+ /// The primary aggregation type value defining how to use the values for display.
+ /// The collection of what all aggregation types are supported.
+ /// The unit of the metric.
+ ///
+ /// Metric availability specifies the time grain (aggregation interval or
+ /// frequency).
+ ///
+ /// A new instance for mocking.
+ public static MetricDefinition MetricDefinition(IEnumerable dimensions = null, string description = null, string name = null, string @namespace = null, AggregationType? primaryAggregationType = null, IEnumerable supportedAggregationTypes = null, MetricUnit? unit = null, IEnumerable metricAvailabilities = null)
+ {
+ dimensions ??= new List();
+ supportedAggregationTypes ??= new List();
+ metricAvailabilities ??= new List();
+
+ return new MetricDefinition(
+ dimensions?.ToList(),
+ description,
+ name,
+ @namespace,
+ primaryAggregationType,
+ supportedAggregationTypes?.ToList(),
+ unit,
+ metricAvailabilities?.ToList(),
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The description.
+ /// The name.
+ /// A new instance for mocking.
+ public static NameAndDescription NameAndDescription(string description = null, string name = null)
+ {
+ return new NameAndDescription(description, name, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// The time grain specifies the aggregation interval for the metric. Expressed as
+ /// a duration 'PT1M', 'PT1H', etc.
+ ///
+ /// A new instance for mocking.
+ public static MetricAvailability MetricAvailability(TimeGrain? timeGrain = null)
+ {
+ return new MetricAvailability(timeGrain, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The values for the metric namespaces.
+ /// A new instance for mocking.
+ public static MetricNamespaces MetricNamespaces(IEnumerable value = null)
+ {
+ value ??= new List();
+
+ return new MetricNamespaces(value?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The namespace description.
+ /// The metric namespace name.
+ /// A new instance for mocking.
+ public static MetricNamespace MetricNamespace(string description = null, string name = null)
+ {
+ return new MetricNamespace(description, name, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// An array of data points representing the metric values.
+ /// The dimension values.
+ /// A new instance for mocking.
+ public static TimeSeriesElement TimeSeriesElement(IEnumerable data = null, IEnumerable dimensionValues = null)
+ {
+ data ??= new List();
+ dimensionValues ??= new List();
+
+ return new TimeSeriesElement(data?.ToList(), dimensionValues?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The timestamp for the metric value in RFC 3339 format.
+ /// The metric value.
+ /// A new instance for mocking.
+ public static MetricValue MetricValue(DateTimeOffset? timestamp = null, double? value = null)
+ {
+ return new MetricValue(timestamp, value, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The name of the dimension.
+ /// The value of the dimension.
+ /// A new instance for mocking.
+ public static DimensionValue DimensionValue(string name = null, string value = null)
+ {
+ return new DimensionValue(name, value, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Unique identifier for the test profile run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.
+ /// Display name for the test profile run.
+ /// The test profile run description.
+ /// Associated test profile ID for the test profile run. This is required to create a test profile run and can't be updated.
+ /// Target resource ID on which the test profile run is created.
+ ///
+ /// Configurations of the target resource on which the test profile ran.
+ /// 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 .
+ ///
+ /// The test profile run status.
+ /// Error details if there is any failure in test profile run. These errors are specific to the Test Profile Run.
+ /// The test profile run start DateTime(RFC 3339 literal format).
+ /// The test profile run end DateTime(RFC 3339 literal format).
+ /// Test profile run duration in seconds.
+ ///
+ /// Details of the test runs ran as part of the test profile run.
+ /// Key is the testRunId of the corresponding testRun.
+ ///
+ /// Recommendations provided based on a successful test profile run.
+ /// The creation datetime(RFC 3339 literal format).
+ /// The user that created.
+ /// The last Modified datetime(RFC 3339 literal format).
+ /// The user that last modified.
+ /// A new instance for mocking.
+ public static TestProfileRun TestProfileRun(string testProfileRunId = null, string displayName = null, string description = null, string testProfileId = null, ResourceIdentifier targetResourceId = null, TargetResourceConfigurations targetResourceConfigurations = null, TestProfileRunStatus? status = null, IEnumerable errorDetails = null, DateTimeOffset? startDateTime = null, DateTimeOffset? endDateTime = null, long? durationInSeconds = null, IReadOnlyDictionary testRunDetails = null, IEnumerable recommendations = null, DateTimeOffset? createdDateTime = null, string createdBy = null, DateTimeOffset? lastModifiedDateTime = null, string lastModifiedBy = null)
+ {
+ errorDetails ??= new List();
+ testRunDetails ??= new Dictionary();
+ recommendations ??= new List();
+
+ return new TestProfileRun(
+ testProfileRunId,
+ displayName,
+ description,
+ testProfileId,
+ targetResourceId,
+ targetResourceConfigurations,
+ status,
+ errorDetails?.ToList(),
+ startDateTime,
+ endDateTime,
+ durationInSeconds,
+ testRunDetails,
+ recommendations?.ToList(),
+ createdDateTime,
+ createdBy,
+ lastModifiedDateTime,
+ lastModifiedBy,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Status of the test run.
+ /// ID of the configuration on which the test ran.
+ /// Key value pair of extra properties associated with the test run.
+ /// A new instance for mocking.
+ public static TestRunDetail TestRunDetail(TestRunStatus status = default, string configurationId = null, IReadOnlyDictionary properties = null)
+ {
+ properties ??= new Dictionary();
+
+ return new TestRunDetail(status, configurationId, properties, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Category of the recommendation.
+ /// List of configurations IDs for which the recommendation is applicable. These are a subset of the provided target resource configurations.
+ /// A new instance for mocking.
+ public static TestProfileRunRecommendation TestProfileRunRecommendation(RecommendationCategory category = default, IEnumerable configurations = null)
+ {
+ configurations ??= new List();
+
+ return new TestProfileRunRecommendation(category, configurations?.ToList(), serializedAdditionalRawData: null);
+ }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/DimensionFilter.Serialization.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/DimensionFilter.Serialization.cs
new file mode 100644
index 000000000000..08a6ff012082
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/DimensionFilter.Serialization.cs
@@ -0,0 +1,170 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Developer.LoadTesting
+{
+ public partial class DimensionFilter : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(DimensionFilter)} does not support writing '{format}' format.");
+ }
+
+ if (Optional.IsDefined(Name))
+ {
+ writer.WritePropertyName("name"u8);
+ writer.WriteStringValue(Name);
+ }
+ if (Optional.IsCollectionDefined(Values))
+ {
+ writer.WritePropertyName("values"u8);
+ writer.WriteStartArray();
+ foreach (var item in Values)
+ {
+ writer.WriteStringValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ DimensionFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(DimensionFilter)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeDimensionFilter(document.RootElement, options);
+ }
+
+ internal static DimensionFilter DeserializeDimensionFilter(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string name = default;
+ IList values = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("values"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(item.GetString());
+ }
+ values = array;
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new DimensionFilter(name, values ?? new ChangeTrackingList(), serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(DimensionFilter)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ DimensionFilter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeDimensionFilter(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(DimensionFilter)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static DimensionFilter FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeDimensionFilter(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/DimensionFilter.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/DimensionFilter.cs
new file mode 100644
index 000000000000..51ae24c5f29d
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/DimensionFilter.cs
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.Developer.LoadTesting
+{
+ /// Dimension name and values to filter.
+ public partial class DimensionFilter
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ public DimensionFilter()
+ {
+ Values = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of .
+ /// The dimension name.
+ /// The dimension values. Maximum values can be 20.
+ /// Keeps track of any properties unknown to the library.
+ internal DimensionFilter(string name, IList values, IDictionary serializedAdditionalRawData)
+ {
+ Name = name;
+ Values = values;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// The dimension name.
+ public string Name { get; set; }
+ /// The dimension values. Maximum values can be 20.
+ public IList Values { get; }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/DimensionValue.Serialization.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/DimensionValue.Serialization.cs
new file mode 100644
index 000000000000..a4d891c69967
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/DimensionValue.Serialization.cs
@@ -0,0 +1,156 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Developer.LoadTesting
+{
+ public partial class DimensionValue : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(DimensionValue)} does not support writing '{format}' format.");
+ }
+
+ if (Optional.IsDefined(Name))
+ {
+ writer.WritePropertyName("name"u8);
+ writer.WriteStringValue(Name);
+ }
+ if (Optional.IsDefined(Value))
+ {
+ writer.WritePropertyName("value"u8);
+ writer.WriteStringValue(Value);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ DimensionValue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(DimensionValue)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeDimensionValue(document.RootElement, options);
+ }
+
+ internal static DimensionValue DeserializeDimensionValue(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string name = default;
+ string value = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("value"u8))
+ {
+ value = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new DimensionValue(name, value, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(DimensionValue)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ DimensionValue IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeDimensionValue(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(DimensionValue)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static DimensionValue FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeDimensionValue(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/DimensionValue.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/DimensionValue.cs
new file mode 100644
index 000000000000..84f36f89f44e
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/DimensionValue.cs
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.Developer.LoadTesting
+{
+ /// Represents a metric dimension value.
+ public partial class DimensionValue
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ internal DimensionValue()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// The name of the dimension.
+ /// The value of the dimension.
+ /// Keeps track of any properties unknown to the library.
+ internal DimensionValue(string name, string value, IDictionary serializedAdditionalRawData)
+ {
+ Name = name;
+ Value = value;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// The name of the dimension.
+ public string Name { get; }
+ /// The value of the dimension.
+ public string Value { get; }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestAdministrationClient.xml b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestAdministrationClient.xml
new file mode 100644
index 000000000000..21a5080b9ff4
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestAdministrationClient.xml
@@ -0,0 +1,871 @@
+
+
+
+
+
+This sample shows how to call CreateOrUpdateTestAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+using RequestContent content = RequestContent.Create(new
+{
+ description = "sample description",
+ displayName = "Performance_LoadTest",
+ loadTestConfiguration = new
+ {
+ engineInstances = 6,
+ splitAllCSVs = true,
+ },
+ passFailCriteria = new
+ {
+ passFailMetrics = new Dictionary
+ {
+ ["fefd759d-7fe8-4f83-8b6d-aeebe0f491fe"] = new
+ {
+ clientMetric = "response_time_ms",
+ aggregate = "percentage",
+ condition = ">",
+ value = 20,
+ action = "continue",
+ }
+ },
+ passFailServerMetrics = new Dictionary
+ {
+ ["fefd759d-7fe8-4f83-8b6d-aeebe0f491fe"] = new
+ {
+ resourceId = "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/MyVM",
+ metricNamespace = "Microsoft.Compute/virtualMachines",
+ metricName = "Percentage CPU",
+ aggregation = "Average",
+ condition = ">",
+ value = 20,
+ action = "continue",
+ }
+ },
+ },
+ autoStopCriteria = new
+ {
+ autoStopDisabled = true,
+ errorRate = 70F,
+ errorRateTimeWindowInSeconds = 60,
+ },
+ secrets = new
+ {
+ secret1 = new
+ {
+ value = "https://samplevault.vault.azure.net/secrets/samplesecret/f113f91fd4c44a368049849c164db827",
+ type = "AKV_SECRET_URI",
+ },
+ },
+ environmentVariables = new
+ {
+ envvar1 = "sampletext",
+ },
+ subnetId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Network/virtualNetworks/samplenetworkresource/subnets/AAAAA0A0A0",
+ keyvaultReferenceIdentityType = "UserAssigned",
+ keyvaultReferenceIdentityId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/sampleprovider/sampleresourcetype/sampleresourcename",
+ metricsReferenceIdentityType = "UserAssigned",
+ metricsReferenceIdentityId = "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/samplerg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sampleresourcename",
+ engineBuiltInIdentityType = "UserAssigned",
+ engineBuiltInIdentityIds = new object[]
+ {
+ "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/samplerg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sampleresourcename"
+ },
+});
+Response response = await client.CreateOrUpdateTestAsync("12345678-1234-1234-1234-123456789012", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("testId").ToString());
+]]>
+
+
+
+This sample shows how to call CreateOrUpdateTest and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+using RequestContent content = RequestContent.Create(new
+{
+ description = "sample description",
+ displayName = "Performance_LoadTest",
+ loadTestConfiguration = new
+ {
+ engineInstances = 6,
+ splitAllCSVs = true,
+ },
+ passFailCriteria = new
+ {
+ passFailMetrics = new Dictionary
+ {
+ ["fefd759d-7fe8-4f83-8b6d-aeebe0f491fe"] = new
+ {
+ clientMetric = "response_time_ms",
+ aggregate = "percentage",
+ condition = ">",
+ value = 20,
+ action = "continue",
+ }
+ },
+ passFailServerMetrics = new Dictionary
+ {
+ ["fefd759d-7fe8-4f83-8b6d-aeebe0f491fe"] = new
+ {
+ resourceId = "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/MyVM",
+ metricNamespace = "Microsoft.Compute/virtualMachines",
+ metricName = "Percentage CPU",
+ aggregation = "Average",
+ condition = ">",
+ value = 20,
+ action = "continue",
+ }
+ },
+ },
+ autoStopCriteria = new
+ {
+ autoStopDisabled = true,
+ errorRate = 70F,
+ errorRateTimeWindowInSeconds = 60,
+ },
+ secrets = new
+ {
+ secret1 = new
+ {
+ value = "https://samplevault.vault.azure.net/secrets/samplesecret/f113f91fd4c44a368049849c164db827",
+ type = "AKV_SECRET_URI",
+ },
+ },
+ environmentVariables = new
+ {
+ envvar1 = "sampletext",
+ },
+ subnetId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Network/virtualNetworks/samplenetworkresource/subnets/AAAAA0A0A0",
+ keyvaultReferenceIdentityType = "UserAssigned",
+ keyvaultReferenceIdentityId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/sampleprovider/sampleresourcetype/sampleresourcename",
+ metricsReferenceIdentityType = "UserAssigned",
+ metricsReferenceIdentityId = "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/samplerg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sampleresourcename",
+ engineBuiltInIdentityType = "UserAssigned",
+ engineBuiltInIdentityIds = new object[]
+ {
+ "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/samplerg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sampleresourcename"
+ },
+});
+Response response = client.CreateOrUpdateTest("12345678-1234-1234-1234-123456789012", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("testId").ToString());
+]]>
+
+
+
+This sample shows how to call CreateOrUpdateAppComponentsAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+using RequestContent content = RequestContent.Create(new
+{
+ components = new Dictionary
+ {
+ ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource"] = new
+ {
+ resourceType = "microsoft.insights/components",
+ resourceName = "appcomponentresource",
+ displayName = "Performance_LoadTest_Insights",
+ kind = "web",
+ }
+ },
+});
+Response response = await client.CreateOrUpdateAppComponentsAsync("ee843bd9-a6d4-4364-a45c-427a03c39fa7", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString());
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString());
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString());
+]]>
+
+
+
+This sample shows how to call CreateOrUpdateAppComponents and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+using RequestContent content = RequestContent.Create(new
+{
+ components = new Dictionary
+ {
+ ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource"] = new
+ {
+ resourceType = "microsoft.insights/components",
+ resourceName = "appcomponentresource",
+ displayName = "Performance_LoadTest_Insights",
+ kind = "web",
+ }
+ },
+});
+Response response = client.CreateOrUpdateAppComponents("ee843bd9-a6d4-4364-a45c-427a03c39fa7", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString());
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString());
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString());
+]]>
+
+
+
+This sample shows how to call CreateOrUpdateServerMetricsConfigAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+using RequestContent content = RequestContent.Create(new
+{
+ metrics = new Dictionary
+ {
+ ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration"] = new
+ {
+ resourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource",
+ metricNamespace = "microsoft.insights/components",
+ displayDescription = "sample description",
+ name = "requests/duration",
+ aggregation = "Average",
+ resourceType = "microsoft.insights/components",
+ }
+ },
+});
+Response response = await client.CreateOrUpdateServerMetricsConfigAsync("edc6e529-d009-4b99-b763-ca492e3a2823", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString());
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString());
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString());
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString());
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString());
+]]>
+
+
+
+This sample shows how to call CreateOrUpdateServerMetricsConfig and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+using RequestContent content = RequestContent.Create(new
+{
+ metrics = new Dictionary
+ {
+ ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration"] = new
+ {
+ resourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource",
+ metricNamespace = "microsoft.insights/components",
+ displayDescription = "sample description",
+ name = "requests/duration",
+ aggregation = "Average",
+ resourceType = "microsoft.insights/components",
+ }
+ },
+});
+Response response = client.CreateOrUpdateServerMetricsConfig("edc6e529-d009-4b99-b763-ca492e3a2823", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString());
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString());
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString());
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString());
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString());
+]]>
+
+
+
+This sample shows how to call GetAppComponentsAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = await client.GetAppComponentsAsync("ee843bd9-a6d4-4364-a45c-427a03c39fa7");
+]]>
+
+
+
+This sample shows how to call GetAppComponents.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = client.GetAppComponents("ee843bd9-a6d4-4364-a45c-427a03c39fa7");
+]]>
+
+
+
+This sample shows how to call GetAppComponentsAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = await client.GetAppComponentsAsync("ee843bd9-a6d4-4364-a45c-427a03c39fa7", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString());
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString());
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString());
+]]>
+
+
+
+This sample shows how to call GetAppComponents and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = client.GetAppComponents("ee843bd9-a6d4-4364-a45c-427a03c39fa7", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString());
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString());
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString());
+]]>
+
+
+
+This sample shows how to call GetServerMetricsConfigAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = await client.GetServerMetricsConfigAsync("12345678-1234-1234-1234-123456789012");
+]]>
+
+
+
+This sample shows how to call GetServerMetricsConfig.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = client.GetServerMetricsConfig("12345678-1234-1234-1234-123456789012");
+]]>
+
+
+
+This sample shows how to call GetServerMetricsConfigAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = await client.GetServerMetricsConfigAsync("12345678-1234-1234-1234-123456789012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString());
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString());
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString());
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString());
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString());
+]]>
+
+
+
+This sample shows how to call GetServerMetricsConfig and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = client.GetServerMetricsConfig("12345678-1234-1234-1234-123456789012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString());
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString());
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString());
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString());
+Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString());
+]]>
+
+
+
+This sample shows how to call GetTestAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = await client.GetTestAsync("12345678-1234-1234-1234-123456789012");
+]]>
+
+
+
+This sample shows how to call GetTest.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = client.GetTest("12345678-1234-1234-1234-123456789012");
+]]>
+
+
+
+This sample shows how to call GetTestAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = await client.GetTestAsync("12345678-1234-1234-1234-123456789012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("testId").ToString());
+]]>
+
+
+
+This sample shows how to call GetTest and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = client.GetTest("12345678-1234-1234-1234-123456789012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("testId").ToString());
+]]>
+
+
+
+This sample shows how to call GetTestFileAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = await client.GetTestFileAsync("12345678-1234-1234-1234-123456789012", "sample.jmx");
+]]>
+
+
+
+This sample shows how to call GetTestFile.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = client.GetTestFile("12345678-1234-1234-1234-123456789012", "sample.jmx");
+]]>
+
+
+
+This sample shows how to call GetTestFileAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = await client.GetTestFileAsync("12345678-1234-1234-1234-123456789012", "sample.jmx", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("fileName").ToString());
+]]>
+
+
+
+This sample shows how to call GetTestFile and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = client.GetTestFile("12345678-1234-1234-1234-123456789012", "sample.jmx", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("fileName").ToString());
+]]>
+
+
+
+This sample shows how to call DeleteTestFileAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = await client.DeleteTestFileAsync("12345678-1234-1234-1234-123456789012", "app.jmx");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call DeleteTestFile.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = client.DeleteTestFile("12345678-1234-1234-1234-123456789012", "app.jmx");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call DeleteTestAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = await client.DeleteTestAsync("12345678-1234-1234-1234-123456789012");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call DeleteTest.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = client.DeleteTest("12345678-1234-1234-1234-123456789012");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call CreateOrUpdateTestProfileAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+using RequestContent content = RequestContent.Create(new
+{
+ description = "sample description",
+ displayName = "Performance_TestProfile",
+ testId = "12346-abcd-6789",
+ targetResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Web/sites/myfunctionapp",
+ targetResourceConfigurations = new
+ {
+ kind = "FunctionsFlexConsumption",
+ configurations = new
+ {
+ config1 = new
+ {
+ instanceMemoryMB = 2048L,
+ httpConcurrency = 16L,
+ },
+ config2 = new
+ {
+ instanceMemoryMB = 4096L,
+ httpConcurrency = 16L,
+ },
+ },
+ },
+});
+Response response = await client.CreateOrUpdateTestProfileAsync("12345678-1234-1234-1234-123456789012", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("testProfileId").ToString());
+]]>
+
+
+
+This sample shows how to call CreateOrUpdateTestProfile and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+using RequestContent content = RequestContent.Create(new
+{
+ description = "sample description",
+ displayName = "Performance_TestProfile",
+ testId = "12346-abcd-6789",
+ targetResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Web/sites/myfunctionapp",
+ targetResourceConfigurations = new
+ {
+ kind = "FunctionsFlexConsumption",
+ configurations = new
+ {
+ config1 = new
+ {
+ instanceMemoryMB = 2048L,
+ httpConcurrency = 16L,
+ },
+ config2 = new
+ {
+ instanceMemoryMB = 4096L,
+ httpConcurrency = 16L,
+ },
+ },
+ },
+});
+Response response = client.CreateOrUpdateTestProfile("12345678-1234-1234-1234-123456789012", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("testProfileId").ToString());
+]]>
+
+
+
+This sample shows how to call DeleteTestProfileAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = await client.DeleteTestProfileAsync("12345678-1234-1234-1234-123456789012");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call DeleteTestProfile.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = client.DeleteTestProfile("12345678-1234-1234-1234-123456789012");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call GetTestProfileAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = await client.GetTestProfileAsync("12345678-1234-1234-1234-123456789012");
+]]>
+
+
+
+This sample shows how to call GetTestProfile.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = client.GetTestProfile("12345678-1234-1234-1234-123456789012");
+]]>
+
+
+
+This sample shows how to call GetTestProfileAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = await client.GetTestProfileAsync("12345678-1234-1234-1234-123456789012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("testProfileId").ToString());
+]]>
+
+
+
+This sample shows how to call GetTestProfile and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+Response response = client.GetTestProfile("12345678-1234-1234-1234-123456789012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("testProfileId").ToString());
+]]>
+
+
+
+This sample shows how to call GetTestFilesAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+await foreach (TestFileInfo item in client.GetTestFilesAsync("12345678-1234-1234-1234-123456789012"))
+{
+}
+]]>
+
+
+
+This sample shows how to call GetTestFiles.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+foreach (TestFileInfo item in client.GetTestFiles("12345678-1234-1234-1234-123456789012"))
+{
+}
+]]>
+
+
+
+This sample shows how to call GetTestFilesAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+await foreach (BinaryData item in client.GetTestFilesAsync("12345678-1234-1234-1234-123456789012", null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("fileName").ToString());
+}
+]]>
+
+
+
+This sample shows how to call GetTestFiles and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+foreach (BinaryData item in client.GetTestFiles("12345678-1234-1234-1234-123456789012", null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("fileName").ToString());
+}
+]]>
+
+
+
+This sample shows how to call GetTestsAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+await foreach (LoadTest item in client.GetTestsAsync())
+{
+}
+]]>
+
+
+
+This sample shows how to call GetTests.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+foreach (LoadTest item in client.GetTests())
+{
+}
+]]>
+
+
+
+This sample shows how to call GetTestsAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+await foreach (BinaryData item in client.GetTestsAsync(null, "Performance_LoadTest", null, null, null, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("testId").ToString());
+}
+]]>
+
+
+
+This sample shows how to call GetTests and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+foreach (BinaryData item in client.GetTests(null, "Performance_LoadTest", null, null, null, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("testId").ToString());
+}
+]]>
+
+
+
+This sample shows how to call GetTestProfilesAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+await foreach (TestProfile item in client.GetTestProfilesAsync())
+{
+}
+]]>
+
+
+
+This sample shows how to call GetTestProfiles.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+foreach (TestProfile item in client.GetTestProfiles())
+{
+}
+]]>
+
+
+
+This sample shows how to call GetTestProfilesAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+await foreach (BinaryData item in client.GetTestProfilesAsync(null, DateTimeOffset.Parse("2024-05-01T16:00:46.072Z"), DateTimeOffset.Parse("2024-05-01T16:50:46.072Z"), null, null, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("testProfileId").ToString());
+}
+]]>
+
+
+
+This sample shows how to call GetTestProfiles and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);
+
+foreach (BinaryData item in client.GetTestProfiles(null, DateTimeOffset.Parse("2024-05-01T16:00:46.072Z"), DateTimeOffset.Parse("2024-05-01T16:50:46.072Z"), null, null, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("testProfileId").ToString());
+}
+]]>
+
+
+
\ No newline at end of file
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestRunClient.xml b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestRunClient.xml
new file mode 100644
index 000000000000..de5880f69a74
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestRunClient.xml
@@ -0,0 +1,917 @@
+
+
+
+
+
+This sample shows how to call CreateOrUpdateAppComponentsAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+using RequestContent content = RequestContent.Create(new
+{
+ components = new Dictionary
+ {
+ ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource"] = new
+ {
+ resourceType = "microsoft.insights/components",
+ resourceName = "appcomponentresource",
+ displayName = "Performance_LoadTest_Insights",
+ kind = "web",
+ }
+ },
+});
+Response response = await client.CreateOrUpdateAppComponentsAsync("ee843bd9-a6d4-4364-a45c-427a03c39fa7", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString());
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString());
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString());
+]]>
+
+
+
+This sample shows how to call CreateOrUpdateAppComponents and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+using RequestContent content = RequestContent.Create(new
+{
+ components = new Dictionary
+ {
+ ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource"] = new
+ {
+ resourceType = "microsoft.insights/components",
+ resourceName = "appcomponentresource",
+ displayName = "Performance_LoadTest_Insights",
+ kind = "web",
+ }
+ },
+});
+Response response = client.CreateOrUpdateAppComponents("ee843bd9-a6d4-4364-a45c-427a03c39fa7", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString());
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString());
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString());
+]]>
+
+
+
+This sample shows how to call CreateOrUpdateServerMetricsConfigAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+using RequestContent content = RequestContent.Create(new
+{
+ metrics = new Dictionary
+ {
+ ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration"] = new
+ {
+ resourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource",
+ metricNamespace = "microsoft.insights/components",
+ displayDescription = "sample description",
+ name = "requests/duration",
+ aggregation = "Average",
+ resourceType = "microsoft.insights/components",
+ }
+ },
+});
+Response response = await client.CreateOrUpdateServerMetricsConfigAsync("edc6e529-d009-4b99-b763-ca492e3a2823", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.ToString());
+]]>
+
+
+
+This sample shows how to call CreateOrUpdateServerMetricsConfig and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+using RequestContent content = RequestContent.Create(new
+{
+ metrics = new Dictionary
+ {
+ ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration"] = new
+ {
+ resourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource",
+ metricNamespace = "microsoft.insights/components",
+ displayDescription = "sample description",
+ name = "requests/duration",
+ aggregation = "Average",
+ resourceType = "microsoft.insights/components",
+ }
+ },
+});
+Response response = client.CreateOrUpdateServerMetricsConfig("edc6e529-d009-4b99-b763-ca492e3a2823", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.ToString());
+]]>
+
+
+
+This sample shows how to call DeleteTestRunAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.DeleteTestRunAsync("12316678-1234-1234-1234-122451189012");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call DeleteTestRun.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.DeleteTestRun("12316678-1234-1234-1234-122451189012");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call GetAppComponentsAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.GetAppComponentsAsync("ee843bd9-a6d4-4364-a45c-427a03c39fa7");
+]]>
+
+
+
+This sample shows how to call GetAppComponents.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.GetAppComponents("ee843bd9-a6d4-4364-a45c-427a03c39fa7");
+]]>
+
+
+
+This sample shows how to call GetAppComponentsAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.GetAppComponentsAsync("ee843bd9-a6d4-4364-a45c-427a03c39fa7", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString());
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString());
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString());
+]]>
+
+
+
+This sample shows how to call GetAppComponents and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.GetAppComponents("ee843bd9-a6d4-4364-a45c-427a03c39fa7", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString());
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString());
+Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString());
+]]>
+
+
+
+This sample shows how to call GetServerMetricsConfigAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.GetServerMetricsConfigAsync("12345678-1234-1234-1234-123456789012");
+]]>
+
+
+
+This sample shows how to call GetServerMetricsConfig.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.GetServerMetricsConfig("12345678-1234-1234-1234-123456789012");
+]]>
+
+
+
+This sample shows how to call GetServerMetricsConfigAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.GetServerMetricsConfigAsync("12345678-1234-1234-1234-123456789012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.ToString());
+]]>
+
+
+
+This sample shows how to call GetServerMetricsConfig and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.GetServerMetricsConfig("12345678-1234-1234-1234-123456789012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.ToString());
+]]>
+
+
+
+This sample shows how to call GetTestRunAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.GetTestRunAsync("12316678-1234-1234-1234-122451189012");
+]]>
+
+
+
+This sample shows how to call GetTestRun.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.GetTestRun("12316678-1234-1234-1234-122451189012");
+]]>
+
+
+
+This sample shows how to call GetTestRunAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.GetTestRunAsync("12316678-1234-1234-1234-122451189012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("testRunId").ToString());
+]]>
+
+
+
+This sample shows how to call GetTestRun and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.GetTestRun("12316678-1234-1234-1234-122451189012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("testRunId").ToString());
+]]>
+
+
+
+This sample shows how to call GetTestRunFileAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.GetTestRunFileAsync("12316678-1234-1234-1234-122451189012", "sample.jmx");
+]]>
+
+
+
+This sample shows how to call GetTestRunFile.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.GetTestRunFile("12316678-1234-1234-1234-122451189012", "sample.jmx");
+]]>
+
+
+
+This sample shows how to call GetTestRunFileAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.GetTestRunFileAsync("12316678-1234-1234-1234-122451189012", "sample.jmx", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("fileName").ToString());
+]]>
+
+
+
+This sample shows how to call GetTestRunFile and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.GetTestRunFile("12316678-1234-1234-1234-122451189012", "sample.jmx", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("fileName").ToString());
+]]>
+
+
+
+This sample shows how to call GetMetricDefinitionsAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.GetMetricDefinitionsAsync("12316678-1234-1234-1234-122451189012", "LoadTestRunMetrics");
+]]>
+
+
+
+This sample shows how to call GetMetricDefinitions.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.GetMetricDefinitions("12316678-1234-1234-1234-122451189012", "LoadTestRunMetrics");
+]]>
+
+
+
+This sample shows how to call GetMetricDefinitionsAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.GetMetricDefinitionsAsync("12316678-1234-1234-1234-122451189012", "LoadTestRunMetrics", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("value")[0].ToString());
+]]>
+
+
+
+This sample shows how to call GetMetricDefinitions and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.GetMetricDefinitions("12316678-1234-1234-1234-122451189012", "LoadTestRunMetrics", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("value")[0].ToString());
+]]>
+
+
+
+This sample shows how to call GetMetricNamespacesAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.GetMetricNamespacesAsync("12316678-1234-1234-1234-122451189012");
+]]>
+
+
+
+This sample shows how to call GetMetricNamespaces.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.GetMetricNamespaces("12316678-1234-1234-1234-122451189012");
+]]>
+
+
+
+This sample shows how to call GetMetricNamespacesAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.GetMetricNamespacesAsync("12316678-1234-1234-1234-122451189012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("value")[0].ToString());
+]]>
+
+
+
+This sample shows how to call GetMetricNamespaces and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.GetMetricNamespaces("12316678-1234-1234-1234-122451189012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("value")[0].ToString());
+]]>
+
+
+
+This sample shows how to call StopTestRunAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.StopTestRunAsync("12316678-1234-1234-1234-122451189012");
+]]>
+
+
+
+This sample shows how to call StopTestRun.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.StopTestRun("12316678-1234-1234-1234-122451189012");
+]]>
+
+
+
+This sample shows how to call StopTestRunAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.StopTestRunAsync("12316678-1234-1234-1234-122451189012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("testRunId").ToString());
+]]>
+
+
+
+This sample shows how to call StopTestRun and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.StopTestRun("12316678-1234-1234-1234-122451189012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("testRunId").ToString());
+]]>
+
+
+
+This sample shows how to call DeleteTestProfileRunAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.DeleteTestProfileRunAsync("12316678-1234-1234-1234-122451189012");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call DeleteTestProfileRun.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.DeleteTestProfileRun("12316678-1234-1234-1234-122451189012");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call GetTestProfileRunAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.GetTestProfileRunAsync("12316678-1234-1234-1234-122451189012");
+]]>
+This sample shows how to call GetTestProfileRunAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.GetTestProfileRunAsync("12316678-1234-1234-1234-122451189012");
+]]>
+
+
+
+This sample shows how to call GetTestProfileRun.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.GetTestProfileRun("12316678-1234-1234-1234-122451189012");
+]]>
+This sample shows how to call GetTestProfileRun.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.GetTestProfileRun("12316678-1234-1234-1234-122451189012");
+]]>
+
+
+
+This sample shows how to call GetTestProfileRunAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.GetTestProfileRunAsync("12316678-1234-1234-1234-122451189012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("testProfileRunId").ToString());
+]]>
+This sample shows how to call GetTestProfileRunAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.GetTestProfileRunAsync("12316678-1234-1234-1234-122451189012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("testProfileRunId").ToString());
+]]>
+
+
+
+This sample shows how to call GetTestProfileRun and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.GetTestProfileRun("12316678-1234-1234-1234-122451189012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("testProfileRunId").ToString());
+]]>
+This sample shows how to call GetTestProfileRun and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.GetTestProfileRun("12316678-1234-1234-1234-122451189012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("testProfileRunId").ToString());
+]]>
+
+
+
+This sample shows how to call StopTestProfileRunAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.StopTestProfileRunAsync("12316678-1234-1234-1234-122451189012");
+]]>
+
+
+
+This sample shows how to call StopTestProfileRun.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.StopTestProfileRun("12316678-1234-1234-1234-122451189012");
+]]>
+
+
+
+This sample shows how to call StopTestProfileRunAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = await client.StopTestProfileRunAsync("12316678-1234-1234-1234-122451189012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("testProfileRunId").ToString());
+]]>
+
+
+
+This sample shows how to call StopTestProfileRun and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+Response response = client.StopTestProfileRun("12316678-1234-1234-1234-122451189012", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("testProfileRunId").ToString());
+]]>
+
+
+
+This sample shows how to call GetMetricDimensionValuesAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+await foreach (string item in client.GetMetricDimensionValuesAsync("12316678-1234-1234-1234-122451189012", "SamplerName", "ActiveThreads", "LoadTestRunMetrics", "2022-09-24T19:00:40Z/2022-09-25T19:28:40Z"))
+{
+}
+]]>
+
+
+
+This sample shows how to call GetMetricDimensionValues.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+foreach (string item in client.GetMetricDimensionValues("12316678-1234-1234-1234-122451189012", "SamplerName", "ActiveThreads", "LoadTestRunMetrics", "2022-09-24T19:00:40Z/2022-09-25T19:28:40Z"))
+{
+}
+]]>
+
+
+
+This sample shows how to call GetMetricDimensionValuesAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+await foreach (BinaryData item in client.GetMetricDimensionValuesAsync("12316678-1234-1234-1234-122451189012", "SamplerName", "ActiveThreads", "LoadTestRunMetrics", "2022-09-24T19:00:40Z/2022-09-25T19:28:40Z", "PT1H", null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.ToString());
+}
+]]>
+
+
+
+This sample shows how to call GetMetricDimensionValues and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+foreach (BinaryData item in client.GetMetricDimensionValues("12316678-1234-1234-1234-122451189012", "SamplerName", "ActiveThreads", "LoadTestRunMetrics", "2022-09-24T19:00:40Z/2022-09-25T19:28:40Z", "PT1H", null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.ToString());
+}
+]]>
+
+
+
+This sample shows how to call GetMetricsAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+await foreach (TimeSeriesElement item in client.GetMetricsAsync("12316678-1234-1234-1234-122451189012", "ActiveThreads", "LoadTestRunMetrics", "2022-09-24T19:00:40Z/2022-09-25T19:28:40Z"))
+{
+}
+]]>
+
+
+
+This sample shows how to call GetMetrics.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+foreach (TimeSeriesElement item in client.GetMetrics("12316678-1234-1234-1234-122451189012", "ActiveThreads", "LoadTestRunMetrics", "2022-09-24T19:00:40Z/2022-09-25T19:28:40Z"))
+{
+}
+]]>
+
+
+
+This sample shows how to call GetMetricsAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+using RequestContent content = RequestContent.Create(new
+{
+ filters = new object[]
+ {
+ new
+ {
+ name = "SamplerName",
+ values = new object[]
+ {
+ "HTTP Request"
+ },
+ }
+ },
+});
+await foreach (BinaryData item in client.GetMetricsAsync("12316678-1234-1234-1234-122451189012", "ActiveThreads", "LoadTestRunMetrics", "2022-09-24T19:00:40Z/2022-09-25T19:28:40Z", content))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.ToString());
+}
+]]>
+
+
+
+This sample shows how to call GetMetrics and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+using RequestContent content = RequestContent.Create(new
+{
+ filters = new object[]
+ {
+ new
+ {
+ name = "SamplerName",
+ values = new object[]
+ {
+ "HTTP Request"
+ },
+ }
+ },
+});
+foreach (BinaryData item in client.GetMetrics("12316678-1234-1234-1234-122451189012", "ActiveThreads", "LoadTestRunMetrics", "2022-09-24T19:00:40Z/2022-09-25T19:28:40Z", content))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.ToString());
+}
+]]>
+
+
+
+This sample shows how to call GetTestRunsAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+await foreach (LoadTestRun item in client.GetTestRunsAsync())
+{
+}
+]]>
+
+
+
+This sample shows how to call GetTestRuns.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+foreach (LoadTestRun item in client.GetTestRuns())
+{
+}
+]]>
+
+
+
+This sample shows how to call GetTestRunsAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+await foreach (BinaryData item in client.GetTestRunsAsync(null, "Performance_LoadTest_Run1", "12345678-1234-1234-1234-123456789012", DateTimeOffset.Parse("2021-12-05T16:43:48.805Z"), DateTimeOffset.Parse("2021-12-05T16:43:48.805Z"), "DONE,EXECUTING", null, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("testRunId").ToString());
+}
+]]>
+
+
+
+This sample shows how to call GetTestRuns and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+foreach (BinaryData item in client.GetTestRuns(null, "Performance_LoadTest_Run1", "12345678-1234-1234-1234-123456789012", DateTimeOffset.Parse("2021-12-05T16:43:48.805Z"), DateTimeOffset.Parse("2021-12-05T16:43:48.805Z"), "DONE,EXECUTING", null, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("testRunId").ToString());
+}
+]]>
+
+
+
+This sample shows how to call GetTestProfileRunsAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+await foreach (TestProfileRun item in client.GetTestProfileRunsAsync())
+{
+}
+]]>
+
+
+
+This sample shows how to call GetTestProfileRuns.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+foreach (TestProfileRun item in client.GetTestProfileRuns())
+{
+}
+]]>
+
+
+
+This sample shows how to call GetTestProfileRunsAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+await foreach (BinaryData item in client.GetTestProfileRunsAsync(null, DateTimeOffset.Parse("2024-05-01T16:00:46.072Z"), DateTimeOffset.Parse("2024-05-01T16:50:46.072Z"), DateTimeOffset.Parse("2024-05-01T16:00:46.072Z"), DateTimeOffset.Parse("2024-05-01T16:50:46.072Z"), null, null, null, null, null, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("testProfileRunId").ToString());
+}
+]]>
+
+
+
+This sample shows how to call GetTestProfileRuns and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
+
+foreach (BinaryData item in client.GetTestProfileRuns(null, DateTimeOffset.Parse("2024-05-01T16:00:46.072Z"), DateTimeOffset.Parse("2024-05-01T16:50:46.072Z"), DateTimeOffset.Parse("2024-05-01T16:00:46.072Z"), DateTimeOffset.Parse("2024-05-01T16:50:46.072Z"), null, null, null, null, null, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("testProfileRunId").ToString());
+}
+]]>
+
+
+
\ No newline at end of file
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/ErrorDetails.Serialization.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/ErrorDetails.Serialization.cs
new file mode 100644
index 000000000000..d2016b9b5ab4
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/ErrorDetails.Serialization.cs
@@ -0,0 +1,145 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Developer.LoadTesting
+{
+ public partial class ErrorDetails : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(ErrorDetails)} does not support writing '{format}' format.");
+ }
+
+ if (options.Format != "W" && Optional.IsDefined(Message))
+ {
+ writer.WritePropertyName("message"u8);
+ writer.WriteStringValue(Message);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ ErrorDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(ErrorDetails)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeErrorDetails(document.RootElement, options);
+ }
+
+ internal static ErrorDetails DeserializeErrorDetails(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string message = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("message"u8))
+ {
+ message = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new ErrorDetails(message, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(ErrorDetails)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ ErrorDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeErrorDetails(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(ErrorDetails)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static ErrorDetails FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeErrorDetails(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/ErrorDetails.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/ErrorDetails.cs
new file mode 100644
index 000000000000..42c16951cb7c
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/ErrorDetails.cs
@@ -0,0 +1,65 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.Developer.LoadTesting
+{
+ /// Error details if there is any failure in load test run.
+ public partial class ErrorDetails
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ internal ErrorDetails()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// Error details in case test run was not successfully run.
+ /// Keeps track of any properties unknown to the library.
+ internal ErrorDetails(string message, IDictionary serializedAdditionalRawData)
+ {
+ Message = message;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Error details in case test run was not successfully run.
+ public string Message { get; }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/FileValidationStatus.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/FileValidationStatus.cs
new file mode 100644
index 000000000000..93393256bc43
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/FileValidationStatus.cs
@@ -0,0 +1,60 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.Developer.LoadTesting
+{
+ /// File status.
+ public readonly partial struct FileValidationStatus : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public FileValidationStatus(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string NotValidatedValue = "NOT_VALIDATED";
+ private const string ValidationSuccessValue = "VALIDATION_SUCCESS";
+ private const string ValidationFailureValue = "VALIDATION_FAILURE";
+ private const string ValidationInitiatedValue = "VALIDATION_INITIATED";
+ private const string ValidationNotRequiredValue = "VALIDATION_NOT_REQUIRED";
+
+ /// File is not validated.
+ public static FileValidationStatus NotValidated { get; } = new FileValidationStatus(NotValidatedValue);
+ /// File is validated.
+ public static FileValidationStatus ValidationSuccess { get; } = new FileValidationStatus(ValidationSuccessValue);
+ /// File validation is failed.
+ public static FileValidationStatus ValidationFailure { get; } = new FileValidationStatus(ValidationFailureValue);
+ /// File validation is in progress.
+ public static FileValidationStatus ValidationInitiated { get; } = new FileValidationStatus(ValidationInitiatedValue);
+ /// Validation is not required.
+ public static FileValidationStatus ValidationNotRequired { get; } = new FileValidationStatus(ValidationNotRequiredValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(FileValidationStatus left, FileValidationStatus right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(FileValidationStatus left, FileValidationStatus right) => !left.Equals(right);
+ /// Converts a to a .
+ public static implicit operator FileValidationStatus(string value) => new FileValidationStatus(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is FileValidationStatus other && Equals(other);
+ ///
+ public bool Equals(FileValidationStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/FunctionFlexConsumptionResourceConfiguration.Serialization.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/FunctionFlexConsumptionResourceConfiguration.Serialization.cs
new file mode 100644
index 000000000000..70955cafaa59
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/FunctionFlexConsumptionResourceConfiguration.Serialization.cs
@@ -0,0 +1,157 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Developer.LoadTesting
+{
+ public partial class FunctionFlexConsumptionResourceConfiguration : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(FunctionFlexConsumptionResourceConfiguration)} does not support writing '{format}' format.");
+ }
+
+ writer.WritePropertyName("instanceMemoryMB"u8);
+ writer.WriteNumberValue(InstanceMemoryMB);
+ if (Optional.IsDefined(HttpConcurrency))
+ {
+ writer.WritePropertyName("httpConcurrency"u8);
+ writer.WriteNumberValue(HttpConcurrency.Value);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ FunctionFlexConsumptionResourceConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(FunctionFlexConsumptionResourceConfiguration)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeFunctionFlexConsumptionResourceConfiguration(document.RootElement, options);
+ }
+
+ internal static FunctionFlexConsumptionResourceConfiguration DeserializeFunctionFlexConsumptionResourceConfiguration(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ long instanceMemoryMB = default;
+ long? httpConcurrency = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("instanceMemoryMB"u8))
+ {
+ instanceMemoryMB = property.Value.GetInt64();
+ continue;
+ }
+ if (property.NameEquals("httpConcurrency"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ httpConcurrency = property.Value.GetInt64();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new FunctionFlexConsumptionResourceConfiguration(instanceMemoryMB, httpConcurrency, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(FunctionFlexConsumptionResourceConfiguration)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ FunctionFlexConsumptionResourceConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeFunctionFlexConsumptionResourceConfiguration(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(FunctionFlexConsumptionResourceConfiguration)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static FunctionFlexConsumptionResourceConfiguration FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeFunctionFlexConsumptionResourceConfiguration(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/FunctionFlexConsumptionResourceConfiguration.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/FunctionFlexConsumptionResourceConfiguration.cs
new file mode 100644
index 000000000000..78c4e07ce0de
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/FunctionFlexConsumptionResourceConfiguration.cs
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.Developer.LoadTesting
+{
+ /// Resource configuration instance for a Flex Consumption based Azure Function App.
+ public partial class FunctionFlexConsumptionResourceConfiguration
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ /// Memory size of the instance. Supported values are 2048, 4096.
+ public FunctionFlexConsumptionResourceConfiguration(long instanceMemoryMB)
+ {
+ InstanceMemoryMB = instanceMemoryMB;
+ }
+
+ /// Initializes a new instance of .
+ /// Memory size of the instance. Supported values are 2048, 4096.
+ /// HTTP Concurrency for the function app.
+ /// Keeps track of any properties unknown to the library.
+ internal FunctionFlexConsumptionResourceConfiguration(long instanceMemoryMB, long? httpConcurrency, IDictionary serializedAdditionalRawData)
+ {
+ InstanceMemoryMB = instanceMemoryMB;
+ HttpConcurrency = httpConcurrency;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal FunctionFlexConsumptionResourceConfiguration()
+ {
+ }
+
+ /// Memory size of the instance. Supported values are 2048, 4096.
+ public long InstanceMemoryMB { get; set; }
+ /// HTTP Concurrency for the function app.
+ public long? HttpConcurrency { get; set; }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/FunctionFlexConsumptionTargetResourceConfigurations.Serialization.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/FunctionFlexConsumptionTargetResourceConfigurations.Serialization.cs
new file mode 100644
index 000000000000..090bcda9c39f
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/FunctionFlexConsumptionTargetResourceConfigurations.Serialization.cs
@@ -0,0 +1,152 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Developer.LoadTesting
+{
+ public partial class FunctionFlexConsumptionTargetResourceConfigurations : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(FunctionFlexConsumptionTargetResourceConfigurations)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsCollectionDefined(Configurations))
+ {
+ writer.WritePropertyName("configurations"u8);
+ writer.WriteStartObject();
+ foreach (var item in Configurations)
+ {
+ writer.WritePropertyName(item.Key);
+ writer.WriteObjectValue(item.Value, options);
+ }
+ writer.WriteEndObject();
+ }
+ }
+
+ FunctionFlexConsumptionTargetResourceConfigurations IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(FunctionFlexConsumptionTargetResourceConfigurations)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeFunctionFlexConsumptionTargetResourceConfigurations(document.RootElement, options);
+ }
+
+ internal static FunctionFlexConsumptionTargetResourceConfigurations DeserializeFunctionFlexConsumptionTargetResourceConfigurations(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ IDictionary configurations = default;
+ ResourceKind kind = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("configurations"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ Dictionary dictionary = new Dictionary();
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ dictionary.Add(property0.Name, FunctionFlexConsumptionResourceConfiguration.DeserializeFunctionFlexConsumptionResourceConfiguration(property0.Value, options));
+ }
+ configurations = dictionary;
+ continue;
+ }
+ if (property.NameEquals("kind"u8))
+ {
+ kind = new ResourceKind(property.Value.GetString());
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new FunctionFlexConsumptionTargetResourceConfigurations(kind, serializedAdditionalRawData, configurations ?? new ChangeTrackingDictionary());
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(FunctionFlexConsumptionTargetResourceConfigurations)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ FunctionFlexConsumptionTargetResourceConfigurations IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeFunctionFlexConsumptionTargetResourceConfigurations(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(FunctionFlexConsumptionTargetResourceConfigurations)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static new FunctionFlexConsumptionTargetResourceConfigurations FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeFunctionFlexConsumptionTargetResourceConfigurations(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal override RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/FunctionFlexConsumptionTargetResourceConfigurations.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/FunctionFlexConsumptionTargetResourceConfigurations.cs
new file mode 100644
index 000000000000..3325be60e099
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/FunctionFlexConsumptionTargetResourceConfigurations.cs
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.Developer.LoadTesting
+{
+ /// Configurations for a Function App using Flex Consumption Plan.
+ public partial class FunctionFlexConsumptionTargetResourceConfigurations : TargetResourceConfigurations
+ {
+ /// Initializes a new instance of .
+ public FunctionFlexConsumptionTargetResourceConfigurations()
+ {
+ Kind = ResourceKind.FunctionsFlexConsumption;
+ Configurations = new ChangeTrackingDictionary();
+ }
+
+ /// Initializes a new instance of .
+ /// Kind of the resource for which the configurations apply.
+ /// Keeps track of any properties unknown to the library.
+ /// A map of configurations for a Function app using Flex Consumption Plan.
+ internal FunctionFlexConsumptionTargetResourceConfigurations(ResourceKind kind, IDictionary serializedAdditionalRawData, IDictionary configurations) : base(kind, serializedAdditionalRawData)
+ {
+ Configurations = configurations;
+ }
+
+ /// A map of configurations for a Function app using Flex Consumption Plan.
+ public IDictionary Configurations { get; }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/Internal/Argument.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/Internal/Argument.cs
new file mode 100644
index 000000000000..946929b236ff
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/Internal/Argument.cs
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Azure.Developer.LoadTesting
+{
+ internal static class Argument
+ {
+ public static void AssertNotNull(T value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ }
+
+ public static void AssertNotNull(T? value, string name)
+ where T : struct
+ {
+ if (!value.HasValue)
+ {
+ throw new ArgumentNullException(name);
+ }
+ }
+
+ public static void AssertNotNullOrEmpty(IEnumerable value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (value is ICollection collectionOfT && collectionOfT.Count == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ if (value is ICollection collection && collection.Count == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ using IEnumerator e = value.GetEnumerator();
+ if (!e.MoveNext())
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ }
+
+ public static void AssertNotNullOrEmpty(string value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (value.Length == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty string.", name);
+ }
+ }
+
+ public static void AssertNotNullOrWhiteSpace(string value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (string.IsNullOrWhiteSpace(value))
+ {
+ throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name);
+ }
+ }
+
+ public static void AssertNotDefault(ref T value, string name)
+ where T : struct, IEquatable
+ {
+ if (value.Equals(default))
+ {
+ throw new ArgumentException("Value cannot be empty.", name);
+ }
+ }
+
+ public static void AssertInRange(T value, T minimum, T maximum, string name)
+ where T : notnull, IComparable
+ {
+ if (minimum.CompareTo(value) > 0)
+ {
+ throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed.");
+ }
+ if (maximum.CompareTo(value) < 0)
+ {
+ throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed.");
+ }
+ }
+
+ public static void AssertEnumDefined(Type enumType, object value, string name)
+ {
+ if (!Enum.IsDefined(enumType, value))
+ {
+ throw new ArgumentException($"Value not defined for {enumType.FullName}.", name);
+ }
+ }
+
+ public static T CheckNotNull(T value, string name)
+ where T : class
+ {
+ AssertNotNull(value, name);
+ return value;
+ }
+
+ public static string CheckNotNullOrEmpty(string value, string name)
+ {
+ AssertNotNullOrEmpty(value, name);
+ return value;
+ }
+
+ public static void AssertNull(T value, string name, string message = null)
+ {
+ if (value != null)
+ {
+ throw new ArgumentException(message ?? "Value must be null.", name);
+ }
+ }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/Internal/ChangeTrackingDictionary.cs
new file mode 100644
index 000000000000..9a5316eba10d
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/Internal/ChangeTrackingDictionary.cs
@@ -0,0 +1,167 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Azure.Developer.LoadTesting
+{
+ internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull
+ {
+ private IDictionary _innerDictionary;
+
+ public ChangeTrackingDictionary()
+ {
+ }
+
+ public ChangeTrackingDictionary(IDictionary dictionary)
+ {
+ if (dictionary == null)
+ {
+ return;
+ }
+ _innerDictionary = new Dictionary(dictionary);
+ }
+
+ public ChangeTrackingDictionary(IReadOnlyDictionary dictionary)
+ {
+ if (dictionary == null)
+ {
+ return;
+ }
+ _innerDictionary = new Dictionary();
+ foreach (var pair in dictionary)
+ {
+ _innerDictionary.Add(pair);
+ }
+ }
+
+ public bool IsUndefined => _innerDictionary == null;
+
+ public int Count => IsUndefined ? 0 : EnsureDictionary().Count;
+
+ public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly;
+
+ public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys;
+
+ public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values;
+
+ public TValue this[TKey key]
+ {
+ get
+ {
+ if (IsUndefined)
+ {
+ throw new KeyNotFoundException(nameof(key));
+ }
+ return EnsureDictionary()[key];
+ }
+ set
+ {
+ EnsureDictionary()[key] = value;
+ }
+ }
+
+ IEnumerable IReadOnlyDictionary.Keys => Keys;
+
+ IEnumerable IReadOnlyDictionary.Values => Values;
+
+ public IEnumerator> GetEnumerator()
+ {
+ if (IsUndefined)
+ {
+ IEnumerator> enumerateEmpty()
+ {
+ yield break;
+ }
+ return enumerateEmpty();
+ }
+ return EnsureDictionary().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ public void Add(KeyValuePair item)
+ {
+ EnsureDictionary().Add(item);
+ }
+
+ public void Clear()
+ {
+ EnsureDictionary().Clear();
+ }
+
+ public bool Contains(KeyValuePair item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Contains(item);
+ }
+
+ public void CopyTo(KeyValuePair[] array, int index)
+ {
+ if (IsUndefined)
+ {
+ return;
+ }
+ EnsureDictionary().CopyTo(array, index);
+ }
+
+ public bool Remove(KeyValuePair item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Remove(item);
+ }
+
+ public void Add(TKey key, TValue value)
+ {
+ EnsureDictionary().Add(key, value);
+ }
+
+ public bool ContainsKey(TKey key)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().ContainsKey(key);
+ }
+
+ public bool Remove(TKey key)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Remove(key);
+ }
+
+ public bool TryGetValue(TKey key, out TValue value)
+ {
+ if (IsUndefined)
+ {
+ value = default;
+ return false;
+ }
+ return EnsureDictionary().TryGetValue(key, out value);
+ }
+
+ public IDictionary EnsureDictionary()
+ {
+ return _innerDictionary ??= new Dictionary();
+ }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/Internal/ChangeTrackingList.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/Internal/ChangeTrackingList.cs
new file mode 100644
index 000000000000..5de833439355
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/Internal/ChangeTrackingList.cs
@@ -0,0 +1,153 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Azure.Developer.LoadTesting
+{
+ internal class ChangeTrackingList : IList, IReadOnlyList
+ {
+ private IList _innerList;
+
+ public ChangeTrackingList()
+ {
+ }
+
+ public ChangeTrackingList(IList innerList)
+ {
+ if (innerList != null)
+ {
+ _innerList = innerList;
+ }
+ }
+
+ public ChangeTrackingList(IReadOnlyList innerList)
+ {
+ if (innerList != null)
+ {
+ _innerList = innerList.ToList();
+ }
+ }
+
+ public bool IsUndefined => _innerList == null;
+
+ public int Count => IsUndefined ? 0 : EnsureList().Count;
+
+ public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly;
+
+ public T this[int index]
+ {
+ get
+ {
+ if (IsUndefined)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ return EnsureList()[index];
+ }
+ set
+ {
+ if (IsUndefined)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ EnsureList()[index] = value;
+ }
+ }
+
+ public void Reset()
+ {
+ _innerList = null;
+ }
+
+ public IEnumerator GetEnumerator()
+ {
+ if (IsUndefined)
+ {
+ IEnumerator enumerateEmpty()
+ {
+ yield break;
+ }
+ return enumerateEmpty();
+ }
+ return EnsureList().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ public void Add(T item)
+ {
+ EnsureList().Add(item);
+ }
+
+ public void Clear()
+ {
+ EnsureList().Clear();
+ }
+
+ public bool Contains(T item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureList().Contains(item);
+ }
+
+ public void CopyTo(T[] array, int arrayIndex)
+ {
+ if (IsUndefined)
+ {
+ return;
+ }
+ EnsureList().CopyTo(array, arrayIndex);
+ }
+
+ public bool Remove(T item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureList().Remove(item);
+ }
+
+ public int IndexOf(T item)
+ {
+ if (IsUndefined)
+ {
+ return -1;
+ }
+ return EnsureList().IndexOf(item);
+ }
+
+ public void Insert(int index, T item)
+ {
+ EnsureList().Insert(index, item);
+ }
+
+ public void RemoveAt(int index)
+ {
+ if (IsUndefined)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ EnsureList().RemoveAt(index);
+ }
+
+ public IList EnsureList()
+ {
+ return _innerList ??= new List();
+ }
+ }
+}
diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/Internal/ModelSerializationExtensions.cs
new file mode 100644
index 000000000000..f72f1fe51168
--- /dev/null
+++ b/sdk/loadtesting/Azure.Developer.LoadTesting/src/Generated/Internal/ModelSerializationExtensions.cs
@@ -0,0 +1,399 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Globalization;
+using System.Text.Json;
+using System.Xml;
+using Azure.Core;
+
+namespace Azure.Developer.LoadTesting
+{
+ internal static class ModelSerializationExtensions
+ {
+ internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 };
+ internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W");
+
+ public static object GetObject(this JsonElement element)
+ {
+ switch (element.ValueKind)
+ {
+ case JsonValueKind.String:
+ return element.GetString();
+ case JsonValueKind.Number:
+ if (element.TryGetInt32(out int intValue))
+ {
+ return intValue;
+ }
+ if (element.TryGetInt64(out long longValue))
+ {
+ return longValue;
+ }
+ return element.GetDouble();
+ case JsonValueKind.True:
+ return true;
+ case JsonValueKind.False:
+ return false;
+ case JsonValueKind.Undefined:
+ case JsonValueKind.Null:
+ return null;
+ case JsonValueKind.Object:
+ var dictionary = new Dictionary();
+ foreach (var jsonProperty in element.EnumerateObject())
+ {
+ dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject());
+ }
+ return dictionary;
+ case JsonValueKind.Array:
+ var list = new List