internal static AppServiceDetectorData DeserializeAppServiceDetectorData(JsonElement element)
        {
            Optional <string>                        kind                  = default;
            ResourceIdentifier                       id                    = default;
            string                                   name                  = default;
            ResourceType                             type                  = default;
            SystemData                               systemData            = default;
            Optional <DetectorInfo>                  metadata              = default;
            Optional <IList <DiagnosticData> >       dataset               = default;
            Optional <OperationStatusAutoGenerated>  status                = default;
            Optional <IList <DataProviderMetadata> > dataProvidersMetadata = default;
            Optional <QueryUtterancesResults>        suggestedUtterances   = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("kind"))
                {
                    kind = property.Value.GetString();
                    continue;
                }
                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 = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("systemData"))
                {
                    systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString());
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("metadata"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            metadata = DetectorInfo.DeserializeDetectorInfo(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("dataset"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            List <DiagnosticData> array = new List <DiagnosticData>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(DiagnosticData.DeserializeDiagnosticData(item));
                            }
                            dataset = array;
                            continue;
                        }
                        if (property0.NameEquals("status"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            status = OperationStatusAutoGenerated.DeserializeOperationStatusAutoGenerated(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("dataProvidersMetadata"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            List <DataProviderMetadata> array = new List <DataProviderMetadata>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(DataProviderMetadata.DeserializeDataProviderMetadata(item));
                            }
                            dataProvidersMetadata = array;
                            continue;
                        }
                        if (property0.NameEquals("suggestedUtterances"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            suggestedUtterances = QueryUtterancesResults.DeserializeQueryUtterancesResults(property0.Value);
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new AppServiceDetectorData(id, name, type, systemData, kind.Value, metadata.Value, Optional.ToList(dataset), status.Value, Optional.ToList(dataProvidersMetadata), suggestedUtterances.Value));
        }