// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// <auto-generated/>

#nullable disable

using System.Collections.Generic;
using System.Text.Json;
using Azure.Core;

namespace Azure.Search.Documents.Indexes.Models
{
    internal partial class ListAliasesResult
    {
        internal static ListAliasesResult DeserializeListAliasesResult(JsonElement element)
        {
            IReadOnlyList<SearchAlias> value = default;
            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("value"))
                {
                    List<SearchAlias> array = new List<SearchAlias>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(SearchAlias.DeserializeSearchAlias(item));
                    }
                    value = array;
                    continue;
                }
            }
            return new ListAliasesResult(value);
        }
    }
}
