internal static ImageAnalysisSkill DeserializeImageAnalysisSkill(JsonElement element)
        {
            ImageAnalysisSkillLanguage?defaultLanguageCode = default;
            IList <VisualFeature>      visualFeatures      = default;
            IList <ImageDetail>        details             = default;
            string odataType   = default;
            string name        = default;
            string description = default;
            string context     = default;
            IList <InputFieldMappingEntry>  inputs  = default;
            IList <OutputFieldMappingEntry> outputs = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("defaultLanguageCode"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    defaultLanguageCode = new ImageAnalysisSkillLanguage(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("visualFeatures"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    List <VisualFeature> array = new List <VisualFeature>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(new VisualFeature(item.GetString()));
                    }
                    visualFeatures = array;
                    continue;
                }
                if (property.NameEquals("details"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    List <ImageDetail> array = new List <ImageDetail>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(new ImageDetail(item.GetString()));
                    }
                    details = array;
                    continue;
                }
                if (property.NameEquals("@odata.type"))
                {
                    odataType = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("description"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    description = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("context"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    context = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("inputs"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    List <InputFieldMappingEntry> array = new List <InputFieldMappingEntry>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        if (item.ValueKind == JsonValueKind.Null)
                        {
                            array.Add(null);
                        }
                        else
                        {
                            array.Add(InputFieldMappingEntry.DeserializeInputFieldMappingEntry(item));
                        }
                    }
                    inputs = array;
                    continue;
                }
                if (property.NameEquals("outputs"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    List <OutputFieldMappingEntry> array = new List <OutputFieldMappingEntry>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        if (item.ValueKind == JsonValueKind.Null)
                        {
                            array.Add(null);
                        }
                        else
                        {
                            array.Add(OutputFieldMappingEntry.DeserializeOutputFieldMappingEntry(item));
                        }
                    }
                    outputs = array;
                    continue;
                }
            }
            return(new ImageAnalysisSkill(odataType, name, description, context, inputs, outputs, defaultLanguageCode, visualFeatures, details));
        }
        internal static ImageAnalysisSkill DeserializeImageAnalysisSkill(JsonElement element)
        {
            Optional <ImageAnalysisSkillLanguage?> defaultLanguageCode = default;
            Optional <IList <VisualFeature> >      visualFeatures      = default;
            Optional <IList <ImageDetail> >        details             = default;
            string            odataType             = default;
            Optional <string> name                  = default;
            Optional <string> description           = default;
            Optional <string> context               = default;
            IList <InputFieldMappingEntry>  inputs  = default;
            IList <OutputFieldMappingEntry> outputs = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("defaultLanguageCode"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        defaultLanguageCode = null;
                        continue;
                    }
                    defaultLanguageCode = new ImageAnalysisSkillLanguage(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("visualFeatures"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    List <VisualFeature> array = new List <VisualFeature>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(new VisualFeature(item.GetString()));
                    }
                    visualFeatures = array;
                    continue;
                }
                if (property.NameEquals("details"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    List <ImageDetail> array = new List <ImageDetail>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(new ImageDetail(item.GetString()));
                    }
                    details = array;
                    continue;
                }
                if (property.NameEquals("@odata.type"))
                {
                    odataType = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("description"))
                {
                    description = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("context"))
                {
                    context = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("inputs"))
                {
                    List <InputFieldMappingEntry> array = new List <InputFieldMappingEntry>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(InputFieldMappingEntry.DeserializeInputFieldMappingEntry(item));
                    }
                    inputs = array;
                    continue;
                }
                if (property.NameEquals("outputs"))
                {
                    List <OutputFieldMappingEntry> array = new List <OutputFieldMappingEntry>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(OutputFieldMappingEntry.DeserializeOutputFieldMappingEntry(item));
                    }
                    outputs = array;
                    continue;
                }
            }
            return(new ImageAnalysisSkill(odataType, name.Value, description.Value, context.Value, inputs, outputs, Optional.ToNullable(defaultLanguageCode), Optional.ToList(visualFeatures), Optional.ToList(details)));
        }