Exemplo n.º 1
0
        internal static LogAnalyticsOperationResult DeserializeLogAnalyticsOperationResult(JsonElement element)
        {
            Optional <LogAnalyticsOutput> properties = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("properties"))
                {
                    properties = LogAnalyticsOutput.DeserializeLogAnalyticsOutput(property.Value);
                    continue;
                }
            }
            return(new LogAnalyticsOperationResult(properties.Value));
        }
        internal static LogAnalytics DeserializeLogAnalytics(JsonElement element)
        {
            Optional <LogAnalyticsOutput> properties = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("properties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    properties = LogAnalyticsOutput.DeserializeLogAnalyticsOutput(property.Value);
                    continue;
                }
            }
            return(new LogAnalytics(properties.Value));
        }