internal static Models_internal DeserializeModels_internal(JsonElement element)
        {
            ModelsSummary_internal             summary   = default;
            IReadOnlyList <ModelInfo_internal> modelList = default;
            string nextLink = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("summary"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    summary = ModelsSummary_internal.DeserializeModelsSummary_internal(property.Value);
                    continue;
                }
                if (property.NameEquals("modelList"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    List <ModelInfo_internal> array = new List <ModelInfo_internal>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        if (item.ValueKind == JsonValueKind.Null)
                        {
                            array.Add(null);
                        }
                        else
                        {
                            array.Add(ModelInfo_internal.DeserializeModelInfo_internal(item));
                        }
                    }
                    modelList = array;
                    continue;
                }
                if (property.NameEquals("nextLink"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    nextLink = property.Value.GetString();
                    continue;
                }
            }
            return(new Models_internal(summary, modelList, nextLink));
        }
 internal Models_internal(ModelsSummary_internal summary, IReadOnlyList <ModelInfo_internal> modelList, string nextLink)
 {
     Summary   = summary;
     ModelList = modelList;
     NextLink  = nextLink;
 }
 internal AccountProperties(ModelsSummary_internal summary)
 {
     CustomModelCount = summary.Count;
     CustomModelLimit = summary.Limit;
 }
Exemple #4
0
 internal AccountProperties(ModelsSummary_internal summary)
 {
     CustomModelCount = summary.Count;
     CustomModelLimit = summary.Limit;
     LastUpdatedOn    = summary.LastUpdatedDateTime;
 }