From d3ccc791ead3fedb95f74cdd80ff004f26a01c26 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Sun, 11 Dec 2022 10:02:17 +0000 Subject: [PATCH] CodeGen from PR 21844 in Azure/azure-rest-api-specs Merge 537588ae345fdacbeeb4e83e8bd5c25f7d53c139 into 23b62d4e4dab07dccda851cfe50f6c6afb705a3b --- .../Generated/MarketplaceAgreementResource.cs | 6 +- .../OldAgreementTermData.Serialization.cs | 157 ++++++++++++++++++ .../OldAgreementTermsList.Serialization.cs | 41 +++++ .../Generated/Models/OldAgreementTermsList.cs | 33 ++++ .../src/Generated/Models/State.cs | 51 ++++++ .../src/Generated/OldAgreementTermData.cs | 57 +++++++ .../MarketplaceAgreementsRestOperations.cs | 63 +++---- .../src/autorest.md | 2 +- 8 files changed, 369 insertions(+), 41 deletions(-) create mode 100644 sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/Models/OldAgreementTermData.Serialization.cs create mode 100644 sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/Models/OldAgreementTermsList.Serialization.cs create mode 100644 sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/Models/OldAgreementTermsList.cs create mode 100644 sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/Models/State.cs create mode 100644 sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/OldAgreementTermData.cs diff --git a/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/MarketplaceAgreementResource.cs b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/MarketplaceAgreementResource.cs index d45ec292cecdf..9c7c11822442b 100644 --- a/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/MarketplaceAgreementResource.cs +++ b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/MarketplaceAgreementResource.cs @@ -34,7 +34,7 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ClientDiagnostics _marketplaceAgreementClientDiagnostics; private readonly MarketplaceAgreementsRestOperations _marketplaceAgreementRestClient; - private readonly MarketplaceAgreementTermData _data; + private readonly OldAgreementTermData _data; /// Initializes a new instance of the class for mocking. protected MarketplaceAgreementResource() @@ -44,7 +44,7 @@ protected MarketplaceAgreementResource() /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal MarketplaceAgreementResource(ArmClient client, MarketplaceAgreementTermData data) : this(client, data.Id) + internal MarketplaceAgreementResource(ArmClient client, OldAgreementTermData data) : this(client, data.Id) { HasData = true; _data = data; @@ -71,7 +71,7 @@ internal MarketplaceAgreementResource(ArmClient client, ResourceIdentifier id) : /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual MarketplaceAgreementTermData Data + public virtual OldAgreementTermData Data { get { diff --git a/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/Models/OldAgreementTermData.Serialization.cs b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/Models/OldAgreementTermData.Serialization.cs new file mode 100644 index 0000000000000..24f187827d110 --- /dev/null +++ b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/Models/OldAgreementTermData.Serialization.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MarketplaceOrdering.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MarketplaceOrdering +{ + public partial class OldAgreementTermData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + if (Optional.IsDefined(IdPropertiesId)) + { + writer.WritePropertyName("id"); + writer.WriteStringValue(IdPropertiesId); + } + if (Optional.IsDefined(Publisher)) + { + writer.WritePropertyName("publisher"); + writer.WriteStringValue(Publisher); + } + if (Optional.IsDefined(Offer)) + { + writer.WritePropertyName("offer"); + writer.WriteStringValue(Offer); + } + if (Optional.IsDefined(SignOn)) + { + writer.WritePropertyName("signDate"); + writer.WriteStringValue(SignOn.Value, "O"); + } + if (Optional.IsDefined(CancelOn)) + { + writer.WritePropertyName("cancelDate"); + writer.WriteStringValue(CancelOn.Value, "O"); + } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"); + writer.WriteStringValue(State.Value.ToString()); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static OldAgreementTermData DeserializeOldAgreementTermData(JsonElement element) + { + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional id0 = default; + Optional publisher = default; + Optional offer = default; + Optional signDate = default; + Optional cancelDate = default; + Optional state = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("id")) + { + id0 = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("publisher")) + { + publisher = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("offer")) + { + offer = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("signDate")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + signDate = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("cancelDate")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + cancelDate = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("state")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + state = new State(property0.Value.GetString()); + continue; + } + } + continue; + } + } + return new OldAgreementTermData(id, name, type, systemData.Value, id0.Value, publisher.Value, offer.Value, Optional.ToNullable(signDate), Optional.ToNullable(cancelDate), Optional.ToNullable(state)); + } + } +} diff --git a/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/Models/OldAgreementTermsList.Serialization.cs b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/Models/OldAgreementTermsList.Serialization.cs new file mode 100644 index 0000000000000..ddf4806e2a97d --- /dev/null +++ b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/Models/OldAgreementTermsList.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MarketplaceOrdering; + +namespace Azure.ResourceManager.MarketplaceOrdering.Models +{ + internal partial class OldAgreementTermsList + { + internal static OldAgreementTermsList DeserializeOldAgreementTermsList(JsonElement element) + { + Optional> value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OldAgreementTermData.DeserializeOldAgreementTermData(item)); + } + value = array; + continue; + } + } + return new OldAgreementTermsList(Optional.ToList(value)); + } + } +} diff --git a/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/Models/OldAgreementTermsList.cs b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/Models/OldAgreementTermsList.cs new file mode 100644 index 0000000000000..d6ceca919a90d --- /dev/null +++ b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/Models/OldAgreementTermsList.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.MarketplaceOrdering; + +namespace Azure.ResourceManager.MarketplaceOrdering.Models +{ + /// Agreement Terms definition list. + internal partial class OldAgreementTermsList + { + /// Initializes a new instance of OldAgreementTermsList. + internal OldAgreementTermsList() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of OldAgreementTermsList. + /// + internal OldAgreementTermsList(IReadOnlyList value) + { + Value = value; + } + + /// Gets the value. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/Models/State.cs b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/Models/State.cs new file mode 100644 index 0000000000000..b3b0e59643602 --- /dev/null +++ b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/Models/State.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.ResourceManager.MarketplaceOrdering.Models +{ + /// Whether the agreement is active or cancelled. + public readonly partial struct State : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public State(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string CanceledValue = "Canceled"; + + /// Active. + public static State Active { get; } = new State(ActiveValue); + /// Canceled. + public static State Canceled { get; } = new State(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(State left, State right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(State left, State right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator State(string value) => new State(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is State other && Equals(other); + /// + public bool Equals(State other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/OldAgreementTermData.cs b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/OldAgreementTermData.cs new file mode 100644 index 0000000000000..fd5ffa34646e8 --- /dev/null +++ b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/OldAgreementTermData.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MarketplaceOrdering.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MarketplaceOrdering +{ + /// A class representing the OldAgreementTerm data model. + public partial class OldAgreementTermData : ResourceData + { + /// Initializes a new instance of OldAgreementTermData. + public OldAgreementTermData() + { + } + + /// Initializes a new instance of OldAgreementTermData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// A unique identifier of the agreement. + /// Publisher identifier string of image being deployed. + /// Offer identifier string of image being deployed. + /// Date and time in UTC of when the terms were accepted. This is empty if state is cancelled. + /// Date and time in UTC of when the terms were cancelled. This is empty if state is active. + /// Whether the agreement is active or cancelled. + internal OldAgreementTermData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string idPropertiesId, string publisher, string offer, DateTimeOffset? signOn, DateTimeOffset? cancelOn, State? state) : base(id, name, resourceType, systemData) + { + IdPropertiesId = idPropertiesId; + Publisher = publisher; + Offer = offer; + SignOn = signOn; + CancelOn = cancelOn; + State = state; + } + + /// A unique identifier of the agreement. + public string IdPropertiesId { get; set; } + /// Publisher identifier string of image being deployed. + public string Publisher { get; set; } + /// Offer identifier string of image being deployed. + public string Offer { get; set; } + /// Date and time in UTC of when the terms were accepted. This is empty if state is cancelled. + public DateTimeOffset? SignOn { get; set; } + /// Date and time in UTC of when the terms were cancelled. This is empty if state is active. + public DateTimeOffset? CancelOn { get; set; } + /// Whether the agreement is active or cancelled. + public State? State { get; set; } + } +} diff --git a/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/RestOperations/MarketplaceAgreementsRestOperations.cs b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/RestOperations/MarketplaceAgreementsRestOperations.cs index 3d4032e314a6c..2d98302bead41 100644 --- a/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/RestOperations/MarketplaceAgreementsRestOperations.cs +++ b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/RestOperations/MarketplaceAgreementsRestOperations.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -259,7 +258,7 @@ internal HttpMessage CreateSignRequest(string subscriptionId, string publisherId /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> SignAsync(string subscriptionId, string publisherId, string offerId, string planId, CancellationToken cancellationToken = default) + public async Task> SignAsync(string subscriptionId, string publisherId, string offerId, string planId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(publisherId, nameof(publisherId)); @@ -272,9 +271,9 @@ public async Task> SignAsync(string subsc { case 200: { - MarketplaceAgreementTermData value = default; + OldAgreementTermData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MarketplaceAgreementTermData.DeserializeMarketplaceAgreementTermData(document.RootElement); + value = OldAgreementTermData.DeserializeOldAgreementTermData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -290,7 +289,7 @@ public async Task> SignAsync(string subsc /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Sign(string subscriptionId, string publisherId, string offerId, string planId, CancellationToken cancellationToken = default) + public Response Sign(string subscriptionId, string publisherId, string offerId, string planId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(publisherId, nameof(publisherId)); @@ -303,9 +302,9 @@ public Response Sign(string subscriptionId, string { case 200: { - MarketplaceAgreementTermData value = default; + OldAgreementTermData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MarketplaceAgreementTermData.DeserializeMarketplaceAgreementTermData(document.RootElement); + value = OldAgreementTermData.DeserializeOldAgreementTermData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -344,7 +343,7 @@ internal HttpMessage CreateCancelRequest(string subscriptionId, string publisher /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> CancelAsync(string subscriptionId, string publisherId, string offerId, string planId, CancellationToken cancellationToken = default) + public async Task> CancelAsync(string subscriptionId, string publisherId, string offerId, string planId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(publisherId, nameof(publisherId)); @@ -357,9 +356,9 @@ public async Task> CancelAsync(string sub { case 200: { - MarketplaceAgreementTermData value = default; + OldAgreementTermData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MarketplaceAgreementTermData.DeserializeMarketplaceAgreementTermData(document.RootElement); + value = OldAgreementTermData.DeserializeOldAgreementTermData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -375,7 +374,7 @@ public async Task> CancelAsync(string sub /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Cancel(string subscriptionId, string publisherId, string offerId, string planId, CancellationToken cancellationToken = default) + public Response Cancel(string subscriptionId, string publisherId, string offerId, string planId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(publisherId, nameof(publisherId)); @@ -388,9 +387,9 @@ public Response Cancel(string subscriptionId, stri { case 200: { - MarketplaceAgreementTermData value = default; + OldAgreementTermData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MarketplaceAgreementTermData.DeserializeMarketplaceAgreementTermData(document.RootElement); + value = OldAgreementTermData.DeserializeOldAgreementTermData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -428,7 +427,7 @@ internal HttpMessage CreateGetAgreementRequest(string subscriptionId, string pub /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAgreementAsync(string subscriptionId, string publisherId, string offerId, string planId, CancellationToken cancellationToken = default) + public async Task> GetAgreementAsync(string subscriptionId, string publisherId, string offerId, string planId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(publisherId, nameof(publisherId)); @@ -441,13 +440,13 @@ public async Task> GetAgreementAsync(stri { case 200: { - MarketplaceAgreementTermData value = default; + OldAgreementTermData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MarketplaceAgreementTermData.DeserializeMarketplaceAgreementTermData(document.RootElement); + value = OldAgreementTermData.DeserializeOldAgreementTermData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((MarketplaceAgreementTermData)null, message.Response); + return Response.FromValue((OldAgreementTermData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -461,7 +460,7 @@ public async Task> GetAgreementAsync(stri /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response GetAgreement(string subscriptionId, string publisherId, string offerId, string planId, CancellationToken cancellationToken = default) + public Response GetAgreement(string subscriptionId, string publisherId, string offerId, string planId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(publisherId, nameof(publisherId)); @@ -474,13 +473,13 @@ public Response GetAgreement(string subscriptionId { case 200: { - MarketplaceAgreementTermData value = default; + OldAgreementTermData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MarketplaceAgreementTermData.DeserializeMarketplaceAgreementTermData(document.RootElement); + value = OldAgreementTermData.DeserializeOldAgreementTermData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((MarketplaceAgreementTermData)null, message.Response); + return Response.FromValue((OldAgreementTermData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -508,7 +507,7 @@ internal HttpMessage CreateListRequest(string subscriptionId) /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public async Task>> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -518,14 +517,9 @@ public async Task>> ListAsy { case 200: { - IReadOnlyList value = default; + OldAgreementTermsList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(MarketplaceAgreementTermData.DeserializeMarketplaceAgreementTermData(item)); - } - value = array; + value = OldAgreementTermsList.DeserializeOldAgreementTermsList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -538,7 +532,7 @@ public async Task>> ListAsy /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public Response> List(string subscriptionId, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -548,14 +542,9 @@ public Response> List(string subscri { case 200: { - IReadOnlyList value = default; + OldAgreementTermsList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(MarketplaceAgreementTermData.DeserializeMarketplaceAgreementTermData(item)); - } - value = array; + value = OldAgreementTermsList.DeserializeOldAgreementTermsList(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/autorest.md b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/autorest.md index 264d3908847d3..9d8e261206855 100644 --- a/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/autorest.md +++ b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: MarketplaceOrdering namespace: Azure.ResourceManager.MarketplaceOrdering -require: https://github.com/Azure/azure-rest-api-specs/blob/6b08774c89877269e73e11ac3ecbd1bd4e14f5a0/specification/marketplaceordering/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/marketplaceordering/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true