internal static Model DeserializeModel(JsonElement element)
        {
            Guid                 modelId         = default;
            DateTimeOffset       createdTime     = default;
            DateTimeOffset       lastUpdatedTime = default;
            Optional <ModelInfo> modelInfo       = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("modelId"))
                {
                    modelId = property.Value.GetGuid();
                    continue;
                }
                if (property.NameEquals("createdTime"))
                {
                    createdTime = property.Value.GetDateTimeOffset("O");
                    continue;
                }
                if (property.NameEquals("lastUpdatedTime"))
                {
                    lastUpdatedTime = property.Value.GetDateTimeOffset("O");
                    continue;
                }
                if (property.NameEquals("modelInfo"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    modelInfo = ModelInfo.DeserializeModelInfo(property.Value);
                    continue;
                }
            }
            return(new Model(modelId, createdTime, lastUpdatedTime, modelInfo.Value));
        }