diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/api/Azure.Developer.LoadTesting.netstandard2.0.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/api/Azure.Developer.LoadTesting.netstandard2.0.cs index 1afcd901ed83..9b6fafbf3afe 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/api/Azure.Developer.LoadTesting.netstandard2.0.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/api/Azure.Developer.LoadTesting.netstandard2.0.cs @@ -1,9 +1,9 @@ namespace Azure.Developer.LoadTesting { - public partial class FileUploadOperation : Azure.Operation + public partial class FileUploadResultOperation : Azure.Operation { - protected FileUploadOperation() { } - public FileUploadOperation(string testId, string fileName, Azure.Developer.LoadTesting.LoadTestAdministrationClient client, Azure.Response initialResponse) { } + protected FileUploadResultOperation() { } + public FileUploadResultOperation(string testId, string fileName, Azure.Developer.LoadTesting.LoadTestAdministrationClient client, Azure.Response initialResponse = null) { } public override bool HasCompleted { get { throw null; } } public override bool HasValue { get { throw null; } } public override string Id { get { throw null; } } @@ -40,8 +40,8 @@ public LoadTestAdministrationClient(System.Uri endpoint, Azure.Core.TokenCredent public virtual Azure.AsyncPageable GetTestFilesAsync(string testId, Azure.RequestContext context = null) { throw null; } public virtual Azure.Pageable GetTests(string orderby = null, string search = null, System.DateTimeOffset? lastModifiedStartTime = default(System.DateTimeOffset?), System.DateTimeOffset? lastModifiedEndTime = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } public virtual Azure.AsyncPageable GetTestsAsync(string orderby = null, string search = null, System.DateTimeOffset? lastModifiedStartTime = default(System.DateTimeOffset?), System.DateTimeOffset? lastModifiedEndTime = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } - public virtual Azure.Developer.LoadTesting.FileUploadOperation UploadTestFile(Azure.WaitUntil waitUntil, string testId, string fileName, Azure.Core.RequestContent content, System.TimeSpan? timeSpan = default(System.TimeSpan?), string fileType = null, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task UploadTestFileAsync(Azure.WaitUntil waitUntil, string testId, string fileName, Azure.Core.RequestContent content, System.TimeSpan? timeSpan = default(System.TimeSpan?), string fileType = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Developer.LoadTesting.FileUploadResultOperation UploadTestFile(Azure.WaitUntil waitUntil, string testId, string fileName, Azure.Core.RequestContent content, System.TimeSpan? timeSpan = default(System.TimeSpan?), string fileType = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task UploadTestFileAsync(Azure.WaitUntil waitUntil, string testId, string fileName, Azure.Core.RequestContent content, System.TimeSpan? timeSpan = default(System.TimeSpan?), string fileType = null, Azure.RequestContext context = null) { throw null; } } public partial class LoadTestingClientOptions : Azure.Core.ClientOptions { @@ -57,8 +57,8 @@ protected LoadTestRunClient() { } public LoadTestRunClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } public LoadTestRunClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Developer.LoadTesting.LoadTestingClientOptions options) { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.Developer.LoadTesting.TestRunOperation BeginTestRun(Azure.WaitUntil waitUntil, string testRunId, Azure.Core.RequestContent content, System.TimeSpan? timeSpan = default(System.TimeSpan?), string oldTestRunId = null, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task BeginTestRunAsync(Azure.WaitUntil waitUntil, string testRunId, Azure.Core.RequestContent content, System.TimeSpan? timeSpan = default(System.TimeSpan?), string oldTestRunId = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Developer.LoadTesting.TestRunResultOperation BeginTestRun(Azure.WaitUntil waitUntil, string testRunId, Azure.Core.RequestContent content, System.TimeSpan? timeSpan = default(System.TimeSpan?), string oldTestRunId = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task BeginTestRunAsync(Azure.WaitUntil waitUntil, string testRunId, Azure.Core.RequestContent content, System.TimeSpan? timeSpan = default(System.TimeSpan?), string oldTestRunId = null, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response CreateOrUpdateAppComponents(string testRunId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task CreateOrUpdateAppComponentsAsync(string testRunId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response CreateOrUpdateServerMetricsConfig(string testRunId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } @@ -69,12 +69,12 @@ public LoadTestRunClient(System.Uri endpoint, Azure.Core.TokenCredential credent public virtual System.Threading.Tasks.Task GetAppComponentsAsync(string testRunId, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response GetMetricDefinitions(string testRunId, string metricNamespace, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task GetMetricDefinitionsAsync(string testRunId, string metricNamespace, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Pageable GetMetricDimensionValues(string testRunId, string name, string metricname, string metricNamespace, string timespan, string interval = null, Azure.RequestContext context = null) { throw null; } - public virtual Azure.AsyncPageable GetMetricDimensionValuesAsync(string testRunId, string name, string metricname, string metricNamespace, string timespan, string interval = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Pageable GetMetricDimensionValues(string testRunId, string name, string metricName, string metricNamespace, string timeInterval, string interval = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.AsyncPageable GetMetricDimensionValuesAsync(string testRunId, string name, string metricName, string metricNamespace, string timeInterval, string interval = null, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response GetMetricNamespaces(string testRunId, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task GetMetricNamespacesAsync(string testRunId, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Pageable GetMetrics(string testRunId, string metricname, string metricNamespace, string timespan, Azure.Core.RequestContent content = null, string aggregation = null, string interval = null, Azure.RequestContext context = null) { throw null; } - public virtual Azure.AsyncPageable GetMetricsAsync(string testRunId, string metricname, string metricNamespace, string timespan, Azure.Core.RequestContent content = null, string aggregation = null, string interval = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Pageable GetMetrics(string testRunId, string metricName, string metricNamespace, string timespan, Azure.Core.RequestContent content = null, string aggregation = null, string interval = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.AsyncPageable GetMetricsAsync(string testRunId, string metricName, string metricNamespace, string timespan, Azure.Core.RequestContent content = null, string aggregation = null, string interval = null, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response GetServerMetricsConfig(string testRunId, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task GetServerMetricsConfigAsync(string testRunId, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response GetTestRun(string testRunId, Azure.RequestContext context = null) { throw null; } @@ -86,10 +86,10 @@ public LoadTestRunClient(System.Uri endpoint, Azure.Core.TokenCredential credent public virtual Azure.Response StopTestRun(string testRunId, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task StopTestRunAsync(string testRunId, Azure.RequestContext context = null) { throw null; } } - public partial class TestRunOperation : Azure.Operation + public partial class TestRunResultOperation : Azure.Operation { - protected TestRunOperation() { } - public TestRunOperation(string testRunId, Azure.Developer.LoadTesting.LoadTestRunClient client, Azure.Response initialResponse = null) { } + protected TestRunResultOperation() { } + public TestRunResultOperation(string testRunId, Azure.Developer.LoadTesting.LoadTestRunClient client, Azure.Response initialResponse = null) { } public override bool HasCompleted { get { throw null; } } public override bool HasValue { get { throw null; } } public override string Id { get { throw null; } } diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/samples/Sample2_BeginUploadTestFile.md b/sdk/loadtestservice/Azure.Developer.LoadTesting/samples/Sample2_BeginUploadTestFile.md index a86a739f4377..820259a15cd5 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/samples/Sample2_BeginUploadTestFile.md +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/samples/Sample2_BeginUploadTestFile.md @@ -22,7 +22,7 @@ string testId = "my-loadtest"; try { // poller object - FileUploadOperation operation = loadTestAdministrationClient.UploadTestFile(WaitUntil.Started, testId, "sample.jmx", RequestContent.Create( + FileUploadResultOperation operation = loadTestAdministrationClient.UploadTestFile(WaitUntil.Started, testId, "sample.jmx", RequestContent.Create( Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "sample.jmx") )); diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/samples/Sample2_BeginUploadTestFileAsync.md b/sdk/loadtestservice/Azure.Developer.LoadTesting/samples/Sample2_BeginUploadTestFileAsync.md index 39c2674baf8c..298c08b48ca6 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/samples/Sample2_BeginUploadTestFileAsync.md +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/samples/Sample2_BeginUploadTestFileAsync.md @@ -22,7 +22,7 @@ string testId = "my-loadtest"; try { // poller object - FileUploadOperation operation = await loadTestAdministrationClient.UploadTestFileAsync(WaitUntil.Started, testId, "sample.jmx", RequestContent.Create( + FileUploadResultOperation operation = await loadTestAdministrationClient.UploadTestFileAsync(WaitUntil.Started, testId, "sample.jmx", RequestContent.Create( Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "sample.jmx") )); diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/samples/Sample4_BeginTestRun.md b/sdk/loadtestservice/Azure.Developer.LoadTesting/samples/Sample4_BeginTestRun.md index 9f74d6832e81..78ebacfac8ad 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/samples/Sample4_BeginTestRun.md +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/samples/Sample4_BeginTestRun.md @@ -30,7 +30,7 @@ var data = new try { - TestRunOperation operation = loadTestRunClient.BeginTestRun( + TestRunResultOperation operation = loadTestRunClient.BeginTestRun( WaitUntil.Started, testRunId, RequestContent.Create(data) ); diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/samples/Sample4_BeginTestRunAsync.md b/sdk/loadtestservice/Azure.Developer.LoadTesting/samples/Sample4_BeginTestRunAsync.md index c0b309ec6e82..32e6f7fa024e 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/samples/Sample4_BeginTestRunAsync.md +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/samples/Sample4_BeginTestRunAsync.md @@ -31,7 +31,7 @@ var data = new try { - TestRunOperation operation = await loadTestRunClient.BeginTestRunAsync( + TestRunResultOperation operation = await loadTestRunClient.BeginTestRunAsync( WaitUntil.Started, testRunId, RequestContent.Create(data) ); diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/FileUploadOperation.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/FileUploadResultOperation.cs similarity index 93% rename from sdk/loadtestservice/Azure.Developer.LoadTesting/src/FileUploadOperation.cs rename to sdk/loadtestservice/Azure.Developer.LoadTesting/src/FileUploadResultOperation.cs index bacaf319b9ce..0d4fde87e89a 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/FileUploadOperation.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/FileUploadResultOperation.cs @@ -15,9 +15,9 @@ namespace Azure.Developer.LoadTesting { /// - /// FileUploadOperation. + /// FileUploadResultOperation. /// - public class FileUploadOperation : Operation + public class FileUploadResultOperation : Operation { private bool _completed; private Response _response; @@ -68,12 +68,12 @@ public override BinaryData Value /// /// FileUploadOperation. /// - protected FileUploadOperation() { } + protected FileUploadResultOperation() { } /// /// FileUploadOperation. /// - public FileUploadOperation(string testId, string fileName, LoadTestAdministrationClient client, Response initialResponse) + public FileUploadResultOperation(string testId, string fileName, LoadTestAdministrationClient client, Response initialResponse = null) { _testId = testId; _fileName = fileName; diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestRunClient.xml b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestRunClient.xml index 0e6f3aadbe09..664e59695365 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestRunClient.xml +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestRunClient.xml @@ -2673,7 +2673,7 @@ var credential = new DefaultAzureCredential(); var endpoint = new Uri(""); var client = new LoadTestRunClient(endpoint, credential); -await foreach (var data in client.GetMetricDimensionValuesAsync("", "", "", "", "")) +await foreach (var data in client.GetMetricDimensionValuesAsync("", "", "", "", "")) { JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement; Console.WriteLine(result.ToString()); @@ -2685,7 +2685,7 @@ var credential = new DefaultAzureCredential(); var endpoint = new Uri(""); var client = new LoadTestRunClient(endpoint, credential); -await foreach (var data in client.GetMetricDimensionValuesAsync("", "", "", "", "", "")) +await foreach (var data in client.GetMetricDimensionValuesAsync("", "", "", "", "", "")) { JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement; Console.WriteLine(result.ToString()); @@ -2701,7 +2701,7 @@ var credential = new DefaultAzureCredential(); var endpoint = new Uri(""); var client = new LoadTestRunClient(endpoint, credential); -foreach (var data in client.GetMetricDimensionValues("", "", "", "", "")) +foreach (var data in client.GetMetricDimensionValues("", "", "", "", "")) { JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement; Console.WriteLine(result.ToString()); @@ -2713,7 +2713,7 @@ var credential = new DefaultAzureCredential(); var endpoint = new Uri(""); var client = new LoadTestRunClient(endpoint, credential); -foreach (var data in client.GetMetricDimensionValues("", "", "", "", "", "")) +foreach (var data in client.GetMetricDimensionValues("", "", "", "", "", "")) { JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement; Console.WriteLine(result.ToString()); diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestRunClient.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestRunClient.cs index a7333c32d8a6..0d2f85e1f321 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestRunClient.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestRunClient.cs @@ -657,52 +657,52 @@ public virtual Response GetServerMetricsConfig(string testRunId, RequestContext /// List the dimension values for the given metric dimension name. /// Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. /// Dimension name. - /// Metric name. + /// Metric name. /// Metric namespace to query metric definitions for. - /// The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. + /// The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. /// The interval (i.e. timegrain) of the query. Allowed values: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H". /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// , , , or is null. + /// , , , or is null. /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. /// - public virtual AsyncPageable GetMetricDimensionValuesAsync(string testRunId, string name, string metricname, string metricNamespace, string timespan, string interval = null, RequestContext context = null) + public virtual AsyncPageable GetMetricDimensionValuesAsync(string testRunId, string name, string metricName, string metricNamespace, string timeInterval, string interval = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(metricname, nameof(metricname)); + Argument.AssertNotNull(metricName, nameof(metricName)); Argument.AssertNotNull(metricNamespace, nameof(metricNamespace)); - Argument.AssertNotNull(timespan, nameof(timespan)); + Argument.AssertNotNull(timeInterval, nameof(timeInterval)); - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetMetricDimensionValuesRequest(testRunId, name, metricname, metricNamespace, timespan, interval, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetMetricDimensionValuesNextPageRequest(nextLink, testRunId, name, metricname, metricNamespace, timespan, interval, context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetMetricDimensionValuesRequest(testRunId, name, metricName, metricNamespace, timeInterval, interval, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetMetricDimensionValuesNextPageRequest(nextLink, testRunId, name, metricName, metricNamespace, timeInterval, interval, context); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "LoadTestRunClient.GetMetricDimensionValues", "value", "nextLink", context); } /// List the dimension values for the given metric dimension name. /// Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. /// Dimension name. - /// Metric name. + /// Metric name. /// Metric namespace to query metric definitions for. - /// The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. + /// The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. /// The interval (i.e. timegrain) of the query. Allowed values: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H". /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// , , , or is null. + /// , , , or is null. /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. /// - public virtual Pageable GetMetricDimensionValues(string testRunId, string name, string metricname, string metricNamespace, string timespan, string interval = null, RequestContext context = null) + public virtual Pageable GetMetricDimensionValues(string testRunId, string name, string metricName, string metricNamespace, string timeInterval, string interval = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(metricname, nameof(metricname)); + Argument.AssertNotNull(metricName, nameof(metricName)); Argument.AssertNotNull(metricNamespace, nameof(metricNamespace)); - Argument.AssertNotNull(timespan, nameof(timespan)); + Argument.AssertNotNull(timeInterval, nameof(timeInterval)); - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetMetricDimensionValuesRequest(testRunId, name, metricname, metricNamespace, timespan, interval, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetMetricDimensionValuesNextPageRequest(nextLink, testRunId, name, metricname, metricNamespace, timespan, interval, context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetMetricDimensionValuesRequest(testRunId, name, metricName, metricNamespace, timeInterval, interval, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetMetricDimensionValuesNextPageRequest(nextLink, testRunId, name, metricName, metricNamespace, timeInterval, interval, context); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "LoadTestRunClient.GetMetricDimensionValues", "value", "nextLink", context); } @@ -903,7 +903,7 @@ internal HttpMessage CreateGetMetricsRequest(string testRunId, string metricname return message; } - internal HttpMessage CreateGetMetricDimensionValuesRequest(string testRunId, string name, string metricname, string metricNamespace, string timespan, string interval, RequestContext context) + internal HttpMessage CreateGetMetricDimensionValuesRequest(string testRunId, string name, string metricName, string metricNamespace, string timeInterval, string interval, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -916,9 +916,9 @@ internal HttpMessage CreateGetMetricDimensionValuesRequest(string testRunId, str uri.AppendPath("/metric-dimensions/", false); uri.AppendPath(name, true); uri.AppendPath("/values", false); - uri.AppendQuery("metricname", metricname, true); + uri.AppendQuery("metricname", metricName, true); uri.AppendQuery("metricNamespace", metricNamespace, true); - uri.AppendQuery("timespan", timespan, true); + uri.AppendQuery("timespan", timeInterval, true); if (interval != null) { uri.AppendQuery("interval", interval, true); @@ -1029,7 +1029,7 @@ internal HttpMessage CreateGetMetricsNextPageRequest(string nextLink, string tes return message; } - internal HttpMessage CreateGetMetricDimensionValuesNextPageRequest(string nextLink, string testRunId, string name, string metricname, string metricNamespace, string timespan, string interval, RequestContext context) + internal HttpMessage CreateGetMetricDimensionValuesNextPageRequest(string nextLink, string testRunId, string name, string metricName, string metricNamespace, string timeInterval, string interval, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/LoadTestAdministrationClient.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/LoadTestAdministrationClient.cs index aff5bcafc86f..0a8725651190 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/LoadTestAdministrationClient.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/LoadTestAdministrationClient.cs @@ -22,7 +22,7 @@ public partial class LoadTestAdministrationClient /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. Details of the response body schema are in the Remarks section below. - public virtual FileUploadOperation UploadTestFile(WaitUntil waitUntil, string testId, string fileName, RequestContent content, TimeSpan? timeSpan = null, string fileType = null, RequestContext context = null) + public virtual FileUploadResultOperation UploadTestFile(WaitUntil waitUntil, string testId, string fileName, RequestContent content, TimeSpan? timeSpan = null, string fileType = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(testId, nameof(testId)); Argument.AssertNotNullOrEmpty(fileName, nameof(fileName)); @@ -39,7 +39,7 @@ public virtual FileUploadOperation UploadTestFile(WaitUntil waitUntil, string te try { Response initialResponse = UploadTestFile(testId, fileName, content, fileType, context); - FileUploadOperation operation = new(testId, fileName, this, initialResponse); + FileUploadResultOperation operation = new(testId, fileName, this, initialResponse); if (waitUntil == WaitUntil.Completed) { operation.WaitForCompletion((TimeSpan)timeSpan, cancellationToken: default); @@ -65,7 +65,7 @@ public virtual FileUploadOperation UploadTestFile(WaitUntil waitUntil, string te /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. Details of the response body schema are in the Remarks section below. - public virtual async Task UploadTestFileAsync(WaitUntil waitUntil, string testId, string fileName, RequestContent content, TimeSpan? timeSpan = null, string fileType = null, RequestContext context = null) + public virtual async Task UploadTestFileAsync(WaitUntil waitUntil, string testId, string fileName, RequestContent content, TimeSpan? timeSpan = null, string fileType = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(testId, nameof(testId)); Argument.AssertNotNullOrEmpty(fileName, nameof(fileName)); @@ -82,7 +82,7 @@ public virtual async Task UploadTestFileAsync(WaitUntil wai try { Response initialResponse = await UploadTestFileAsync(testId, fileName, content, fileType, context).ConfigureAwait(false); - FileUploadOperation operation = new(testId, fileName, this, initialResponse); + FileUploadResultOperation operation = new(testId, fileName, this, initialResponse); if (waitUntil == WaitUntil.Completed) { await operation.WaitForCompletionAsync((TimeSpan)timeSpan, cancellationToken: default).ConfigureAwait(false); diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/LoadTestRunClient.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/LoadTestRunClient.cs index b376297ce867..031f2107b187 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/LoadTestRunClient.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/LoadTestRunClient.cs @@ -20,7 +20,7 @@ public partial class LoadTestRunClient /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. Details of the response body schema are in the Remarks section below. - public virtual TestRunOperation BeginTestRun(WaitUntil waitUntil, string testRunId, RequestContent content, TimeSpan? timeSpan = null, string oldTestRunId = null, RequestContext context = null) + public virtual TestRunResultOperation BeginTestRun(WaitUntil waitUntil, string testRunId, RequestContent content, TimeSpan? timeSpan = null, string oldTestRunId = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); Argument.AssertNotNull(content, nameof(content)); @@ -36,7 +36,7 @@ public virtual TestRunOperation BeginTestRun(WaitUntil waitUntil, string testRun try { Response initialResponse = CreateOrUpdateTestRun(testRunId, content, oldTestRunId, context); - TestRunOperation operation = new(testRunId, this, initialResponse); + TestRunResultOperation operation = new(testRunId, this, initialResponse); if (waitUntil == WaitUntil.Completed) { operation.WaitForCompletion((TimeSpan)timeSpan, cancellationToken: default); @@ -61,7 +61,7 @@ public virtual TestRunOperation BeginTestRun(WaitUntil waitUntil, string testRun /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. Details of the response body schema are in the Remarks section below. - public virtual async Task BeginTestRunAsync(WaitUntil waitUntil, string testRunId, RequestContent content, TimeSpan? timeSpan = null, string oldTestRunId = null, RequestContext context = null) + public virtual async Task BeginTestRunAsync(WaitUntil waitUntil, string testRunId, RequestContent content, TimeSpan? timeSpan = null, string oldTestRunId = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); Argument.AssertNotNull(content, nameof(content)); @@ -77,7 +77,7 @@ public virtual async Task BeginTestRunAsync(WaitUntil waitUnti try { Response initialResponse = await CreateOrUpdateTestRunAsync(testRunId, content, oldTestRunId, context).ConfigureAwait(false); - TestRunOperation operation = new(testRunId, this, initialResponse); + TestRunResultOperation operation = new(testRunId, this, initialResponse); if (waitUntil == WaitUntil.Completed) { await operation.WaitForCompletionAsync((TimeSpan)timeSpan, cancellationToken: default).ConfigureAwait(false); @@ -127,22 +127,22 @@ public virtual Pageable GetTestRuns(string orderby = null, string se /// List the metric values for a load test run. /// Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. - /// Metric name. + /// Metric name. /// Metric namespace to query metric definitions for. /// The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. /// The content to send as the body of the request. Details of the request body schema are in the Remarks section below. /// The aggregation. /// The interval (i.e. timegrain) of the query. Allowed values: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H". /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// , , or is null. + /// , , or is null. /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. /// - public virtual AsyncPageable GetMetricsAsync(string testRunId, string metricname, string metricNamespace, string timespan, RequestContent content = null, string aggregation = null, string interval = null, RequestContext context = null) + public virtual AsyncPageable GetMetricsAsync(string testRunId, string metricName, string metricNamespace, string timespan, RequestContent content = null, string aggregation = null, string interval = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); - Argument.AssertNotNull(metricname, nameof(metricname)); + Argument.AssertNotNull(metricName, nameof(metricName)); Argument.AssertNotNull(metricNamespace, nameof(metricNamespace)); Argument.AssertNotNull(timespan, nameof(timespan)); @@ -151,29 +151,29 @@ public virtual AsyncPageable GetMetricsAsync(string testRunId, strin content = RequestContent.Create(new { }); } - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetMetricsRequest(testRunId, metricname, metricNamespace, timespan, content, aggregation, interval, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetMetricsNextPageRequest(nextLink, testRunId, metricname, metricNamespace, timespan, content, aggregation, interval, context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetMetricsRequest(testRunId, metricName, metricNamespace, timespan, content, aggregation, interval, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetMetricsNextPageRequest(nextLink, testRunId, metricName, metricNamespace, timespan, content, aggregation, interval, context); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "LoadTestRunClient.GetMetrics", "value", "nextLink", context); } /// List the metric values for a load test run. /// Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. - /// Metric name. + /// Metric name. /// Metric namespace to query metric definitions for. /// The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. /// The content to send as the body of the request. Details of the request body schema are in the Remarks section below. /// The aggregation. /// The interval (i.e. timegrain) of the query. Allowed values: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H". /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// , , or is null. + /// , , or is null. /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. /// - public virtual Pageable GetMetrics(string testRunId, string metricname, string metricNamespace, string timespan, RequestContent content = null, string aggregation = null, string interval = null, RequestContext context = null) + public virtual Pageable GetMetrics(string testRunId, string metricName, string metricNamespace, string timespan, RequestContent content = null, string aggregation = null, string interval = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); - Argument.AssertNotNull(metricname, nameof(metricname)); + Argument.AssertNotNull(metricName, nameof(metricName)); Argument.AssertNotNull(metricNamespace, nameof(metricNamespace)); Argument.AssertNotNull(timespan, nameof(timespan)); @@ -182,8 +182,8 @@ public virtual Pageable GetMetrics(string testRunId, string metricna content = RequestContent.Create(new { }); } - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetMetricsRequest(testRunId, metricname, metricNamespace, timespan, content, aggregation, interval, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetMetricsNextPageRequest(nextLink, testRunId, metricname, metricNamespace, timespan, content, aggregation, interval, context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetMetricsRequest(testRunId, metricName, metricNamespace, timespan, content, aggregation, interval, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetMetricsNextPageRequest(nextLink, testRunId, metricName, metricNamespace, timespan, content, aggregation, interval, context); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "LoadTestRunClient.GetMetrics", "value", "nextLink", context); } } diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/TestRunOperation.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/TestRunResultOperation.cs similarity index 94% rename from sdk/loadtestservice/Azure.Developer.LoadTesting/src/TestRunOperation.cs rename to sdk/loadtestservice/Azure.Developer.LoadTesting/src/TestRunResultOperation.cs index 967b7309ca5c..d267780db2a1 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/TestRunOperation.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/TestRunResultOperation.cs @@ -14,7 +14,7 @@ namespace Azure.Developer.LoadTesting /// /// Represents a long-running operation for TestRun. /// - public class TestRunOperation : Operation + public class TestRunResultOperation : Operation { private bool _completed; private Response _response; @@ -63,12 +63,12 @@ public override BinaryData Value /// /// FileUploadOperation. /// - protected TestRunOperation() { } + protected TestRunResultOperation() { } /// /// FileUploadOperation. /// - public TestRunOperation(string testRunId, LoadTestRunClient client, Response initialResponse = null) + public TestRunResultOperation(string testRunId, LoadTestRunClient client, Response initialResponse = null) { _testRunId = Id = testRunId; _client = client; diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/autorest.md b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/autorest.md index 2c5756639d9d..e16c21147c5f 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/autorest.md +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/autorest.md @@ -20,4 +20,12 @@ directive: where: $["paths"]["/test-runs/{testRunId}"].patch transform: > $["x-accessibility"] = "internal"; + - from: swagger-document + where: $["paths"]["/test-runs/{testRunId}/metric-dimensions/{name}/values"].get + transform: > + $["parameters"][5]["x-ms-client-name"] = "timeInterval"; + - from: swagger-document + where: $["paths"]["/test-runs/{testRunId}/metric-dimensions/{name}/values"].get + transform: > + $["parameters"][3]["x-ms-client-name"] = "metricName"; ``` diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/LoadTestAdministrationClientTest.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/LoadTestAdministrationClientTest.cs index 69f5235acdbb..4c3004ccbc8f 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/LoadTestAdministrationClientTest.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/LoadTestAdministrationClientTest.cs @@ -318,7 +318,7 @@ await _loadTestAdministrationClient.CreateOrUpdateServerMetricsConfigAsync( [Test] public async Task UploadTestFile() { - FileUploadOperation fileUploadOperation = await _loadTestAdministrationClient.UploadTestFileAsync( + FileUploadResultOperation fileUploadOperation = await _loadTestAdministrationClient.UploadTestFileAsync( WaitUntil.Completed, _testId, _fileName, RequestContent.Create( File.OpenRead(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), _fileName)) ) diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/LoadTestRunClientTest.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/LoadTestRunClientTest.cs index a820235dd90a..d558f0f48fd2 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/LoadTestRunClientTest.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/LoadTestRunClientTest.cs @@ -48,7 +48,7 @@ public async Task TearDown() [Category(SKIP_TEST_RUN)] public async Task BeginCreateOrUpdateTestRun() { - TestRunOperation testRunOperation = await _loadTestRunClient.BeginTestRunAsync( + TestRunResultOperation testRunOperation = await _loadTestRunClient.BeginTestRunAsync( WaitUntil.Completed, _testRunId, RequestContent.Create( new { diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/LoadTestTestsBase.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/LoadTestTestsBase.cs index 4f82e72ff462..64babf581a5f 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/LoadTestTestsBase.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/LoadTestTestsBase.cs @@ -29,7 +29,7 @@ public class LoadTestTestsBase: RecordedTestBase SetupTestRunAsync(LoadTestRunClient loadTestRunClient, string testRunId, string testId, WaitUntil waitUntil) + public async Task SetupTestRunAsync(LoadTestRunClient loadTestRunClient, string testRunId, string testId, WaitUntil waitUntil) { return await loadTestRunClient.BeginTestRunAsync(waitUntil, testRunId, RequestContent.Create( new