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

namespace Azure.ResourceManager.Sql.Models
{
    public partial class SyncAgentKeyProperties
    {
        internal static SyncAgentKeyProperties DeserializeSyncAgentKeyProperties(JsonElement element)
        {
            Optional<string> syncAgentKey = default;
            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("syncAgentKey"))
                {
                    syncAgentKey = property.Value.GetString();
                    continue;
                }
            }
            return new SyncAgentKeyProperties(syncAgentKey.Value);
        }
    }
}
