From 1cd3430bc520cb023f489efa3b9287e56da55261 Mon Sep 17 00:00:00 2001 From: Mitesh Shah <58204159+mitsha-microsoft@users.noreply.github.com> Date: Fri, 7 Feb 2025 17:38:02 +0530 Subject: [PATCH] New generation with more typespec updates, used better data types --- .../DeveloperLoadTestingModelFactory.cs | 11 +++--- .../Generated/LoadTestAdministrationClient.cs | 36 +++++++++---------- .../src/Generated/LoadTestRunClient.cs | 36 +++++++++---------- .../Models/AppComponent.Serialization.cs | 4 +-- .../src/Generated/Models/AppComponent.cs | 5 +-- .../PassFailServerMetric.Serialization.cs | 4 +-- .../Generated/Models/PassFailServerMetric.cs | 7 ++-- .../RegionalConfiguration.Serialization.cs | 4 +-- .../Generated/Models/RegionalConfiguration.cs | 10 +++--- .../Models/ResourceMetric.Serialization.cs | 4 +-- .../src/Generated/Models/ResourceMetric.cs | 7 ++-- .../Models/TestProfile.Serialization.cs | 8 +++-- .../src/Generated/Models/TestProfile.cs | 5 +-- .../Models/TestProfileRun.Serialization.cs | 8 +++-- .../src/Generated/Models/TestProfileRun.cs | 5 +-- .../tsp-location.yaml | 2 +- 16 files changed, 84 insertions(+), 72 deletions(-) diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/DeveloperLoadTestingModelFactory.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/DeveloperLoadTestingModelFactory.cs index cc5331cd7ccb8..820b510251391 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/DeveloperLoadTestingModelFactory.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/DeveloperLoadTestingModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure.Core; namespace Azure.Developer.LoadTesting.Models { @@ -123,7 +124,7 @@ public static PassFailMetric PassFailMetric(PFMetrics? clientMetric = null, PFAg /// The actual value of the server metric. /// Outcome of the test run. /// A new instance for mocking. - public static PassFailServerMetric PassFailServerMetric(string resourceId = null, string metricNamespace = null, string metricName = null, string aggregation = null, string condition = null, double value = default, PFAction? action = null, double? actualValue = null, PFResult? result = null) + public static PassFailServerMetric PassFailServerMetric(ResourceIdentifier resourceId = null, string metricNamespace = null, string metricName = null, string aggregation = null, string condition = null, double value = default, PFAction? action = null, double? actualValue = null, PFResult? result = null) { return new PassFailServerMetric( resourceId, @@ -215,7 +216,7 @@ public static TestAppComponents TestAppComponents(IDictionary Subscription Id of the Azure resource. /// Kind of Azure resource type. /// A new instance for mocking. - public static AppComponent AppComponent(string resourceId = null, string resourceName = null, string resourceType = null, string displayName = null, string resourceGroup = null, string subscriptionId = null, string kind = null) + public static AppComponent AppComponent(ResourceIdentifier resourceId = null, string resourceName = null, string resourceType = null, string displayName = null, string resourceGroup = null, string subscriptionId = null, string kind = null) { return new AppComponent( resourceId, @@ -264,7 +265,7 @@ public static TestServerMetricConfig TestServerMetricConfig(string testId = null /// Metric unit. /// Azure resource type. /// A new instance for mocking. - public static ResourceMetric ResourceMetric(string id = null, string resourceId = null, string metricNamespace = null, string displayDescription = null, string name = null, string aggregation = null, string unit = null, string resourceType = null) + 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, @@ -294,7 +295,7 @@ public static ResourceMetric ResourceMetric(string id = null, string resourceId /// 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, string targetResourceId = null, TargetResourceConfigurations targetResourceConfigurations = null, DateTimeOffset? createdDateTime = null, string createdBy = null, DateTimeOffset? lastModifiedDateTime = null, string lastModifiedBy = null) + 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, @@ -719,7 +720,7 @@ public static DimensionValue DimensionValue(string name = null, string value = n /// 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, string 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) + 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(); diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestAdministrationClient.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestAdministrationClient.cs index dd3863ebeb8d0..d9c198fb0bbaa 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestAdministrationClient.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestAdministrationClient.cs @@ -1445,9 +1445,9 @@ public virtual Pageable GetTestFiles(string testId, RequestContext c public virtual AsyncPageable GetTestsAsync(string orderby = null, string search = null, DateTimeOffset? lastModifiedStartTime = null, DateTimeOffset? lastModifiedEndTime = null, int? maxpagesize = null, CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestsRequest(orderby, search, lastModifiedStartTime, lastModifiedEndTime, maxpagesize, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestsNextPageRequest(nextLink, orderby, search, lastModifiedStartTime, lastModifiedEndTime, maxpagesize, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => Test.DeserializeTest(e), ClientDiagnostics, _pipeline, "LoadTestAdministrationClient.GetTests", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestsRequest(orderby, search, lastModifiedStartTime, lastModifiedEndTime, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestsNextPageRequest(nextLink, orderby, search, lastModifiedStartTime, lastModifiedEndTime, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => Test.DeserializeTest(e), ClientDiagnostics, _pipeline, "LoadTestAdministrationClient.GetTests", "value", "nextLink", maxpagesize, context); } /// @@ -1470,9 +1470,9 @@ public virtual AsyncPageable GetTestsAsync(string orderby = null, string s public virtual Pageable GetTests(string orderby = null, string search = null, DateTimeOffset? lastModifiedStartTime = null, DateTimeOffset? lastModifiedEndTime = null, int? maxpagesize = null, CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestsRequest(orderby, search, lastModifiedStartTime, lastModifiedEndTime, maxpagesize, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestsNextPageRequest(nextLink, orderby, search, lastModifiedStartTime, lastModifiedEndTime, maxpagesize, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => Test.DeserializeTest(e), ClientDiagnostics, _pipeline, "LoadTestAdministrationClient.GetTests", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestsRequest(orderby, search, lastModifiedStartTime, lastModifiedEndTime, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestsNextPageRequest(nextLink, orderby, search, lastModifiedStartTime, lastModifiedEndTime, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => Test.DeserializeTest(e), ClientDiagnostics, _pipeline, "LoadTestAdministrationClient.GetTests", "value", "nextLink", maxpagesize, context); } /// List test profiles. @@ -1487,9 +1487,9 @@ public virtual Pageable GetTests(string orderby = null, string search = nu public virtual AsyncPageable GetTestProfilesAsync(int? maxpagesize = null, DateTimeOffset? lastModifiedStartTime = null, DateTimeOffset? lastModifiedEndTime = null, IEnumerable testProfileIds = null, IEnumerable testIds = null, CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestProfilesRequest(maxpagesize, lastModifiedStartTime, lastModifiedEndTime, testProfileIds, testIds, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestProfilesNextPageRequest(nextLink, maxpagesize, lastModifiedStartTime, lastModifiedEndTime, testProfileIds, testIds, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => TestProfile.DeserializeTestProfile(e), ClientDiagnostics, _pipeline, "LoadTestAdministrationClient.GetTestProfiles", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestProfilesRequest(pageSizeHint, lastModifiedStartTime, lastModifiedEndTime, testProfileIds, testIds, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestProfilesNextPageRequest(nextLink, pageSizeHint, lastModifiedStartTime, lastModifiedEndTime, testProfileIds, testIds, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => TestProfile.DeserializeTestProfile(e), ClientDiagnostics, _pipeline, "LoadTestAdministrationClient.GetTestProfiles", "value", "nextLink", maxpagesize, context); } /// List test profiles. @@ -1504,9 +1504,9 @@ public virtual AsyncPageable GetTestProfilesAsync(int? maxpagesize public virtual Pageable GetTestProfiles(int? maxpagesize = null, DateTimeOffset? lastModifiedStartTime = null, DateTimeOffset? lastModifiedEndTime = null, IEnumerable testProfileIds = null, IEnumerable testIds = null, CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestProfilesRequest(maxpagesize, lastModifiedStartTime, lastModifiedEndTime, testProfileIds, testIds, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestProfilesNextPageRequest(nextLink, maxpagesize, lastModifiedStartTime, lastModifiedEndTime, testProfileIds, testIds, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => TestProfile.DeserializeTestProfile(e), ClientDiagnostics, _pipeline, "LoadTestAdministrationClient.GetTestProfiles", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestProfilesRequest(pageSizeHint, lastModifiedStartTime, lastModifiedEndTime, testProfileIds, testIds, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestProfilesNextPageRequest(nextLink, pageSizeHint, lastModifiedStartTime, lastModifiedEndTime, testProfileIds, testIds, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => TestProfile.DeserializeTestProfile(e), ClientDiagnostics, _pipeline, "LoadTestAdministrationClient.GetTestProfiles", "value", "nextLink", maxpagesize, context); } /// @@ -1535,9 +1535,9 @@ public virtual Pageable GetTestProfiles(int? maxpagesize = null, Da /// public virtual AsyncPageable GetTestProfilesAsync(int? maxpagesize, DateTimeOffset? lastModifiedStartTime, DateTimeOffset? lastModifiedEndTime, IEnumerable testProfileIds, IEnumerable testIds, RequestContext context) { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestProfilesRequest(maxpagesize, lastModifiedStartTime, lastModifiedEndTime, testProfileIds, testIds, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestProfilesNextPageRequest(nextLink, maxpagesize, lastModifiedStartTime, lastModifiedEndTime, testProfileIds, testIds, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "LoadTestAdministrationClient.GetTestProfiles", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestProfilesRequest(pageSizeHint, lastModifiedStartTime, lastModifiedEndTime, testProfileIds, testIds, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestProfilesNextPageRequest(nextLink, pageSizeHint, lastModifiedStartTime, lastModifiedEndTime, testProfileIds, testIds, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "LoadTestAdministrationClient.GetTestProfiles", "value", "nextLink", maxpagesize, context); } /// @@ -1566,9 +1566,9 @@ public virtual AsyncPageable GetTestProfilesAsync(int? maxpagesize, /// public virtual Pageable GetTestProfiles(int? maxpagesize, DateTimeOffset? lastModifiedStartTime, DateTimeOffset? lastModifiedEndTime, IEnumerable testProfileIds, IEnumerable testIds, RequestContext context) { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestProfilesRequest(maxpagesize, lastModifiedStartTime, lastModifiedEndTime, testProfileIds, testIds, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestProfilesNextPageRequest(nextLink, maxpagesize, lastModifiedStartTime, lastModifiedEndTime, testProfileIds, testIds, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "LoadTestAdministrationClient.GetTestProfiles", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestProfilesRequest(pageSizeHint, lastModifiedStartTime, lastModifiedEndTime, testProfileIds, testIds, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestProfilesNextPageRequest(nextLink, pageSizeHint, lastModifiedStartTime, lastModifiedEndTime, testProfileIds, testIds, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "LoadTestAdministrationClient.GetTestProfiles", "value", "nextLink", maxpagesize, context); } internal HttpMessage CreateCreateOrUpdateTestRequest(string testId, RequestContent content, RequestContext context) diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestRunClient.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestRunClient.cs index 100459fb9c008..40f0a2b2fec57 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestRunClient.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestRunClient.cs @@ -1812,9 +1812,9 @@ public virtual Pageable GetMetrics(string testRunId, string m public virtual AsyncPageable GetTestRunsAsync(string orderby = null, string search = null, string testId = null, DateTimeOffset? executionFrom = null, DateTimeOffset? executionTo = null, string status = null, int? maxpagesize = null, CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestRunsRequest(orderby, search, testId, executionFrom, executionTo, status, maxpagesize, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestRunsNextPageRequest(nextLink, orderby, search, testId, executionFrom, executionTo, status, maxpagesize, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => TestRun.DeserializeTestRun(e), ClientDiagnostics, _pipeline, "LoadTestRunClient.GetTestRuns", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestRunsRequest(orderby, search, testId, executionFrom, executionTo, status, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestRunsNextPageRequest(nextLink, orderby, search, testId, executionFrom, executionTo, status, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => TestRun.DeserializeTestRun(e), ClientDiagnostics, _pipeline, "LoadTestRunClient.GetTestRuns", "value", "nextLink", maxpagesize, context); } /// Get all test runs for the given filters. @@ -1836,9 +1836,9 @@ public virtual AsyncPageable GetTestRunsAsync(string orderby = null, st public virtual Pageable GetTestRuns(string orderby = null, string search = null, string testId = null, DateTimeOffset? executionFrom = null, DateTimeOffset? executionTo = null, string status = null, int? maxpagesize = null, CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestRunsRequest(orderby, search, testId, executionFrom, executionTo, status, maxpagesize, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestRunsNextPageRequest(nextLink, orderby, search, testId, executionFrom, executionTo, status, maxpagesize, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => TestRun.DeserializeTestRun(e), ClientDiagnostics, _pipeline, "LoadTestRunClient.GetTestRuns", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestRunsRequest(orderby, search, testId, executionFrom, executionTo, status, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestRunsNextPageRequest(nextLink, orderby, search, testId, executionFrom, executionTo, status, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => TestRun.DeserializeTestRun(e), ClientDiagnostics, _pipeline, "LoadTestRunClient.GetTestRuns", "value", "nextLink", maxpagesize, context); } /// List test profile runs. @@ -1858,9 +1858,9 @@ public virtual Pageable GetTestRuns(string orderby = null, string searc public virtual AsyncPageable GetTestProfileRunsAsync(int? maxpagesize = null, DateTimeOffset? minStartDateTime = null, DateTimeOffset? maxStartDateTime = null, DateTimeOffset? minEndDateTime = null, DateTimeOffset? maxEndDateTime = null, DateTimeOffset? createdDateStartTime = null, DateTimeOffset? createdDateEndTime = null, IEnumerable testProfileRunIds = null, IEnumerable testProfileIds = null, IEnumerable statuses = null, CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestProfileRunsRequest(maxpagesize, minStartDateTime, maxStartDateTime, minEndDateTime, maxEndDateTime, createdDateStartTime, createdDateEndTime, testProfileRunIds, testProfileIds, statuses, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestProfileRunsNextPageRequest(nextLink, maxpagesize, minStartDateTime, maxStartDateTime, minEndDateTime, maxEndDateTime, createdDateStartTime, createdDateEndTime, testProfileRunIds, testProfileIds, statuses, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => TestProfileRun.DeserializeTestProfileRun(e), ClientDiagnostics, _pipeline, "LoadTestRunClient.GetTestProfileRuns", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestProfileRunsRequest(pageSizeHint, minStartDateTime, maxStartDateTime, minEndDateTime, maxEndDateTime, createdDateStartTime, createdDateEndTime, testProfileRunIds, testProfileIds, statuses, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestProfileRunsNextPageRequest(nextLink, pageSizeHint, minStartDateTime, maxStartDateTime, minEndDateTime, maxEndDateTime, createdDateStartTime, createdDateEndTime, testProfileRunIds, testProfileIds, statuses, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => TestProfileRun.DeserializeTestProfileRun(e), ClientDiagnostics, _pipeline, "LoadTestRunClient.GetTestProfileRuns", "value", "nextLink", maxpagesize, context); } /// List test profile runs. @@ -1880,9 +1880,9 @@ public virtual AsyncPageable GetTestProfileRunsAsync(int? maxpag public virtual Pageable GetTestProfileRuns(int? maxpagesize = null, DateTimeOffset? minStartDateTime = null, DateTimeOffset? maxStartDateTime = null, DateTimeOffset? minEndDateTime = null, DateTimeOffset? maxEndDateTime = null, DateTimeOffset? createdDateStartTime = null, DateTimeOffset? createdDateEndTime = null, IEnumerable testProfileRunIds = null, IEnumerable testProfileIds = null, IEnumerable statuses = null, CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestProfileRunsRequest(maxpagesize, minStartDateTime, maxStartDateTime, minEndDateTime, maxEndDateTime, createdDateStartTime, createdDateEndTime, testProfileRunIds, testProfileIds, statuses, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestProfileRunsNextPageRequest(nextLink, maxpagesize, minStartDateTime, maxStartDateTime, minEndDateTime, maxEndDateTime, createdDateStartTime, createdDateEndTime, testProfileRunIds, testProfileIds, statuses, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => TestProfileRun.DeserializeTestProfileRun(e), ClientDiagnostics, _pipeline, "LoadTestRunClient.GetTestProfileRuns", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestProfileRunsRequest(pageSizeHint, minStartDateTime, maxStartDateTime, minEndDateTime, maxEndDateTime, createdDateStartTime, createdDateEndTime, testProfileRunIds, testProfileIds, statuses, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestProfileRunsNextPageRequest(nextLink, pageSizeHint, minStartDateTime, maxStartDateTime, minEndDateTime, maxEndDateTime, createdDateStartTime, createdDateEndTime, testProfileRunIds, testProfileIds, statuses, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => TestProfileRun.DeserializeTestProfileRun(e), ClientDiagnostics, _pipeline, "LoadTestRunClient.GetTestProfileRuns", "value", "nextLink", maxpagesize, context); } /// @@ -1916,9 +1916,9 @@ public virtual Pageable GetTestProfileRuns(int? maxpagesize = nu /// public virtual AsyncPageable GetTestProfileRunsAsync(int? maxpagesize, DateTimeOffset? minStartDateTime, DateTimeOffset? maxStartDateTime, DateTimeOffset? minEndDateTime, DateTimeOffset? maxEndDateTime, DateTimeOffset? createdDateStartTime, DateTimeOffset? createdDateEndTime, IEnumerable testProfileRunIds, IEnumerable testProfileIds, IEnumerable statuses, RequestContext context) { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestProfileRunsRequest(maxpagesize, minStartDateTime, maxStartDateTime, minEndDateTime, maxEndDateTime, createdDateStartTime, createdDateEndTime, testProfileRunIds, testProfileIds, statuses, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestProfileRunsNextPageRequest(nextLink, maxpagesize, minStartDateTime, maxStartDateTime, minEndDateTime, maxEndDateTime, createdDateStartTime, createdDateEndTime, testProfileRunIds, testProfileIds, statuses, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "LoadTestRunClient.GetTestProfileRuns", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestProfileRunsRequest(pageSizeHint, minStartDateTime, maxStartDateTime, minEndDateTime, maxEndDateTime, createdDateStartTime, createdDateEndTime, testProfileRunIds, testProfileIds, statuses, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestProfileRunsNextPageRequest(nextLink, pageSizeHint, minStartDateTime, maxStartDateTime, minEndDateTime, maxEndDateTime, createdDateStartTime, createdDateEndTime, testProfileRunIds, testProfileIds, statuses, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "LoadTestRunClient.GetTestProfileRuns", "value", "nextLink", maxpagesize, context); } /// @@ -1952,9 +1952,9 @@ public virtual AsyncPageable GetTestProfileRunsAsync(int? maxpagesiz /// public virtual Pageable GetTestProfileRuns(int? maxpagesize, DateTimeOffset? minStartDateTime, DateTimeOffset? maxStartDateTime, DateTimeOffset? minEndDateTime, DateTimeOffset? maxEndDateTime, DateTimeOffset? createdDateStartTime, DateTimeOffset? createdDateEndTime, IEnumerable testProfileRunIds, IEnumerable testProfileIds, IEnumerable statuses, RequestContext context) { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestProfileRunsRequest(maxpagesize, minStartDateTime, maxStartDateTime, minEndDateTime, maxEndDateTime, createdDateStartTime, createdDateEndTime, testProfileRunIds, testProfileIds, statuses, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestProfileRunsNextPageRequest(nextLink, maxpagesize, minStartDateTime, maxStartDateTime, minEndDateTime, maxEndDateTime, createdDateStartTime, createdDateEndTime, testProfileRunIds, testProfileIds, statuses, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "LoadTestRunClient.GetTestProfileRuns", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTestProfileRunsRequest(pageSizeHint, minStartDateTime, maxStartDateTime, minEndDateTime, maxEndDateTime, createdDateStartTime, createdDateEndTime, testProfileRunIds, testProfileIds, statuses, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTestProfileRunsNextPageRequest(nextLink, pageSizeHint, minStartDateTime, maxStartDateTime, minEndDateTime, maxEndDateTime, createdDateStartTime, createdDateEndTime, testProfileRunIds, testProfileIds, statuses, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "LoadTestRunClient.GetTestProfileRuns", "value", "nextLink", maxpagesize, context); } internal HttpMessage CreateCreateOrUpdateTestRunRequest(string testRunId, RequestContent content, string oldTestRunId, RequestContext context) diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/AppComponent.Serialization.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/AppComponent.Serialization.cs index 2d9984e7315b7..8f699a1423441 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/AppComponent.Serialization.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/AppComponent.Serialization.cs @@ -100,7 +100,7 @@ internal static AppComponent DeserializeAppComponent(JsonElement element, ModelR { return null; } - string resourceId = default; + ResourceIdentifier resourceId = default; string resourceName = default; string resourceType = default; string displayName = default; @@ -113,7 +113,7 @@ internal static AppComponent DeserializeAppComponent(JsonElement element, ModelR { if (property.NameEquals("resourceId"u8)) { - resourceId = property.Value.GetString(); + resourceId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("resourceName"u8)) diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/AppComponent.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/AppComponent.cs index 084093404e076..ba896a38393ac 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/AppComponent.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/AppComponent.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Core; namespace Azure.Developer.LoadTesting.Models { @@ -67,7 +68,7 @@ public AppComponent(string resourceName, string resourceType) /// Subscription Id of the Azure resource. /// Kind of Azure resource type. /// Keeps track of any properties unknown to the library. - internal AppComponent(string resourceId, string resourceName, string resourceType, string displayName, string resourceGroup, string subscriptionId, string kind, IDictionary serializedAdditionalRawData) + internal AppComponent(ResourceIdentifier resourceId, string resourceName, string resourceType, string displayName, string resourceGroup, string subscriptionId, string kind, IDictionary serializedAdditionalRawData) { ResourceId = resourceId; ResourceName = resourceName; @@ -85,7 +86,7 @@ internal AppComponent() } /// fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. - public string ResourceId { get; } + public ResourceIdentifier ResourceId { get; } /// Azure resource name, required while creating the app component. public string ResourceName { get; set; } /// Azure resource type, required while creating the app component. diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/PassFailServerMetric.Serialization.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/PassFailServerMetric.Serialization.cs index 7f0250e7f69e7..2a1fdb98cf16e 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/PassFailServerMetric.Serialization.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/PassFailServerMetric.Serialization.cs @@ -98,7 +98,7 @@ internal static PassFailServerMetric DeserializePassFailServerMetric(JsonElement { return null; } - string resourceId = default; + ResourceIdentifier resourceId = default; string metricNamespace = default; string metricName = default; string aggregation = default; @@ -113,7 +113,7 @@ internal static PassFailServerMetric DeserializePassFailServerMetric(JsonElement { if (property.NameEquals("resourceId"u8)) { - resourceId = property.Value.GetString(); + resourceId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("metricNamespace"u8)) diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/PassFailServerMetric.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/PassFailServerMetric.cs index 7be784cb09824..f8e1b19aba447 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/PassFailServerMetric.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/PassFailServerMetric.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Core; namespace Azure.Developer.LoadTesting.Models { @@ -53,7 +54,7 @@ public partial class PassFailServerMetric /// The comparison operator. Supported types ‘>’, ‘<’. /// The value to compare with the server metric. /// , , , or is null. - public PassFailServerMetric(string resourceId, string metricNamespace, string metricName, string aggregation, string condition, double value) + public PassFailServerMetric(ResourceIdentifier resourceId, string metricNamespace, string metricName, string aggregation, string condition, double value) { Argument.AssertNotNull(resourceId, nameof(resourceId)); Argument.AssertNotNull(metricNamespace, nameof(metricNamespace)); @@ -80,7 +81,7 @@ public PassFailServerMetric(string resourceId, string metricNamespace, string me /// The actual value of the server metric. /// Outcome of the test run. /// Keeps track of any properties unknown to the library. - internal PassFailServerMetric(string resourceId, string metricNamespace, string metricName, string aggregation, string condition, double value, PFAction? action, double? actualValue, PFResult? result, IDictionary serializedAdditionalRawData) + internal PassFailServerMetric(ResourceIdentifier resourceId, string metricNamespace, string metricName, string aggregation, string condition, double value, PFAction? action, double? actualValue, PFResult? result, IDictionary serializedAdditionalRawData) { ResourceId = resourceId; MetricNamespace = metricNamespace; @@ -100,7 +101,7 @@ internal PassFailServerMetric() } /// The resource id of the resource emitting the metric. - public string ResourceId { get; set; } + public ResourceIdentifier ResourceId { get; set; } /// The server metric namespace. public string MetricNamespace { get; set; } /// The server metric name. diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/RegionalConfiguration.Serialization.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/RegionalConfiguration.Serialization.cs index a524a07ab0c4e..4508192bfe0c9 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/RegionalConfiguration.Serialization.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/RegionalConfiguration.Serialization.cs @@ -76,7 +76,7 @@ internal static RegionalConfiguration DeserializeRegionalConfiguration(JsonEleme return null; } int engineInstances = default; - string region = default; + AzureLocation region = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -88,7 +88,7 @@ internal static RegionalConfiguration DeserializeRegionalConfiguration(JsonEleme } if (property.NameEquals("region"u8)) { - region = property.Value.GetString(); + region = new AzureLocation(property.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/RegionalConfiguration.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/RegionalConfiguration.cs index 5c75ab33f8500..61eaccae1d3d6 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/RegionalConfiguration.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/RegionalConfiguration.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Core; namespace Azure.Developer.LoadTesting.Models { @@ -52,11 +53,8 @@ public partial class RegionalConfiguration /// 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. /// - /// is null. - public RegionalConfiguration(int engineInstances, string region) + public RegionalConfiguration(int engineInstances, AzureLocation region) { - Argument.AssertNotNull(region, nameof(region)); - EngineInstances = engineInstances; Region = region; } @@ -69,7 +67,7 @@ public RegionalConfiguration(int engineInstances, string region) /// 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. /// /// Keeps track of any properties unknown to the library. - internal RegionalConfiguration(int engineInstances, string region, IDictionary serializedAdditionalRawData) + internal RegionalConfiguration(int engineInstances, AzureLocation region, IDictionary serializedAdditionalRawData) { EngineInstances = engineInstances; Region = region; @@ -88,6 +86,6 @@ internal RegionalConfiguration() /// 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. /// - public string Region { get; set; } + public AzureLocation Region { get; set; } } } diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/ResourceMetric.Serialization.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/ResourceMetric.Serialization.cs index d57f7075d59ae..1b03ccda8aceb 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/ResourceMetric.Serialization.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/ResourceMetric.Serialization.cs @@ -97,7 +97,7 @@ internal static ResourceMetric DeserializeResourceMetric(JsonElement element, Mo return null; } string id = default; - string resourceId = default; + ResourceIdentifier resourceId = default; string metricNamespace = default; string displayDescription = default; string name = default; @@ -115,7 +115,7 @@ internal static ResourceMetric DeserializeResourceMetric(JsonElement element, Mo } if (property.NameEquals("resourceId"u8)) { - resourceId = property.Value.GetString(); + resourceId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("metricNamespace"u8)) diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/ResourceMetric.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/ResourceMetric.cs index 389fb59c9c489..80c3c1102a9ea 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/ResourceMetric.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/ResourceMetric.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Core; namespace Azure.Developer.LoadTesting.Models { @@ -56,7 +57,7 @@ public partial class ResourceMetric /// Metric aggregation. /// Azure resource type. /// , , , or is null. - public ResourceMetric(string resourceId, string metricNamespace, string name, string aggregation, string resourceType) + public ResourceMetric(ResourceIdentifier resourceId, string metricNamespace, string name, string aggregation, string resourceType) { Argument.AssertNotNull(resourceId, nameof(resourceId)); Argument.AssertNotNull(metricNamespace, nameof(metricNamespace)); @@ -81,7 +82,7 @@ public ResourceMetric(string resourceId, string metricNamespace, string name, st /// Metric unit. /// Azure resource type. /// Keeps track of any properties unknown to the library. - internal ResourceMetric(string id, string resourceId, string metricNamespace, string displayDescription, string name, string aggregation, string unit, string resourceType, IDictionary serializedAdditionalRawData) + internal ResourceMetric(string id, ResourceIdentifier resourceId, string metricNamespace, string displayDescription, string name, string aggregation, string unit, string resourceType, IDictionary serializedAdditionalRawData) { Id = id; ResourceId = resourceId; @@ -102,7 +103,7 @@ internal ResourceMetric() /// Unique name for metric. public string Id { get; } /// Azure resource id. - public string ResourceId { get; set; } + public ResourceIdentifier ResourceId { get; set; } /// Metric name space. public string MetricNamespace { get; set; } /// Metric description. diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/TestProfile.Serialization.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/TestProfile.Serialization.cs index abfb91e8a896b..6bd82eb4f9adb 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/TestProfile.Serialization.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/TestProfile.Serialization.cs @@ -125,7 +125,7 @@ internal static TestProfile DeserializeTestProfile(JsonElement element, ModelRea string displayName = default; string description = default; string testId = default; - string targetResourceId = default; + ResourceIdentifier targetResourceId = default; TargetResourceConfigurations targetResourceConfigurations = default; DateTimeOffset? createdDateTime = default; string createdBy = default; @@ -157,7 +157,11 @@ internal static TestProfile DeserializeTestProfile(JsonElement element, ModelRea } if (property.NameEquals("targetResourceId"u8)) { - targetResourceId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetResourceId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("targetResourceConfigurations"u8)) diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/TestProfile.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/TestProfile.cs index 38c5d1f23c6d7..ea6d2a9ffd6ca 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/TestProfile.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/TestProfile.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Core; namespace Azure.Developer.LoadTesting.Models { @@ -66,7 +67,7 @@ public TestProfile() /// The last Modified datetime(RFC 3339 literal format). /// The user that last modified. /// Keeps track of any properties unknown to the library. - internal TestProfile(string testProfileId, string displayName, string description, string testId, string targetResourceId, TargetResourceConfigurations targetResourceConfigurations, DateTimeOffset? createdDateTime, string createdBy, DateTimeOffset? lastModifiedDateTime, string lastModifiedBy, IDictionary serializedAdditionalRawData) + internal TestProfile(string testProfileId, string displayName, string description, string testId, ResourceIdentifier targetResourceId, TargetResourceConfigurations targetResourceConfigurations, DateTimeOffset? createdDateTime, string createdBy, DateTimeOffset? lastModifiedDateTime, string lastModifiedBy, IDictionary serializedAdditionalRawData) { TestProfileId = testProfileId; DisplayName = displayName; @@ -90,7 +91,7 @@ internal TestProfile(string testProfileId, string displayName, string descriptio /// Associated test ID for the test profile. This property is required for creating a Test Profile and it's not allowed to be updated. public string TestId { get; set; } /// 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. - public string TargetResourceId { get; set; } + public ResourceIdentifier TargetResourceId { get; set; } /// /// 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. diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/TestProfileRun.Serialization.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/TestProfileRun.Serialization.cs index 4efd2dc5b90db..fee6a4be4b71e 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/TestProfileRun.Serialization.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/TestProfileRun.Serialization.cs @@ -176,7 +176,7 @@ internal static TestProfileRun DeserializeTestProfileRun(JsonElement element, Mo string displayName = default; string description = default; string testProfileId = default; - string targetResourceId = default; + ResourceIdentifier targetResourceId = default; TargetResourceConfigurations targetResourceConfigurations = default; TestProfileRunStatus? status = default; IReadOnlyList errorDetails = default; @@ -215,7 +215,11 @@ internal static TestProfileRun DeserializeTestProfileRun(JsonElement element, Mo } if (property.NameEquals("targetResourceId"u8)) { - targetResourceId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetResourceId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("targetResourceConfigurations"u8)) diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/TestProfileRun.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/TestProfileRun.cs index 020765e25cd71..da186562b4fc4 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/TestProfileRun.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Models/TestProfileRun.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Core; namespace Azure.Developer.LoadTesting.Models { @@ -79,7 +80,7 @@ public TestProfileRun() /// The last Modified datetime(RFC 3339 literal format). /// The user that last modified. /// Keeps track of any properties unknown to the library. - internal TestProfileRun(string testProfileRunId, string displayName, string description, string testProfileId, string targetResourceId, TargetResourceConfigurations targetResourceConfigurations, TestProfileRunStatus? status, IReadOnlyList errorDetails, DateTimeOffset? startDateTime, DateTimeOffset? endDateTime, long? durationInSeconds, IReadOnlyDictionary testRunDetails, IReadOnlyList recommendations, DateTimeOffset? createdDateTime, string createdBy, DateTimeOffset? lastModifiedDateTime, string lastModifiedBy, IDictionary serializedAdditionalRawData) + internal TestProfileRun(string testProfileRunId, string displayName, string description, string testProfileId, ResourceIdentifier targetResourceId, TargetResourceConfigurations targetResourceConfigurations, TestProfileRunStatus? status, IReadOnlyList errorDetails, DateTimeOffset? startDateTime, DateTimeOffset? endDateTime, long? durationInSeconds, IReadOnlyDictionary testRunDetails, IReadOnlyList recommendations, DateTimeOffset? createdDateTime, string createdBy, DateTimeOffset? lastModifiedDateTime, string lastModifiedBy, IDictionary serializedAdditionalRawData) { TestProfileRunId = testProfileRunId; DisplayName = displayName; @@ -110,7 +111,7 @@ internal TestProfileRun(string testProfileRunId, string displayName, string desc /// Associated test profile ID for the test profile run. This is required to create a test profile run and can't be updated. public string TestProfileId { get; set; } /// Target resource ID on which the test profile run is created. - public string TargetResourceId { get; } + public ResourceIdentifier TargetResourceId { get; } /// /// 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. diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/tsp-location.yaml b/sdk/loadtestservice/Azure.Developer.LoadTesting/tsp-location.yaml index d3cba0d482d58..edfaaed1963e3 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/tsp-location.yaml +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/tsp-location.yaml @@ -1,3 +1,3 @@ directory: specification/loadtestservice/LoadTestService -commit: 7dcb1704183a4bfc6044e39397cfc829c9acde4c +commit: b68ad793825fa8282ad0ef50e8f17532ea6ff877 repo: Azure/azure-rest-api-specs \ No newline at end of file