internal static ModelInfo_internal DeserializeModelInfo_internal(JsonElement element) { ModelInfo_internal result = new ModelInfo_internal(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("modelId")) { result.ModelId = property.Value.GetGuid(); continue; } if (property.NameEquals("status")) { result.Status = property.Value.GetString().ToModelStatus(); continue; } if (property.NameEquals("createdDateTime")) { result.CreatedDateTime = property.Value.GetDateTimeOffset("S"); continue; } if (property.NameEquals("lastUpdatedDateTime")) { result.LastUpdatedDateTime = property.Value.GetDateTimeOffset("S"); continue; } } return(result); }
internal CustomModelInfo(ModelInfo_internal modelInfo) { ModelId = modelInfo.ModelId.ToString(); CreatedOn = modelInfo.CreatedDateTime; LastUpdatedOn = modelInfo.LastUpdatedDateTime; Status = modelInfo.Status; }
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()) { 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 static Models_internal DeserializeModels_internal(JsonElement element) { Models_internal result = new Models_internal(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("summary")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } result.Summary = ModelsSummary_internal.DeserializeModelsSummary_internal(property.Value); continue; } if (property.NameEquals("modelList")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } result.ModelList = new List <ModelInfo_internal>(); foreach (var item in property.Value.EnumerateArray()) { result.ModelList.Add(ModelInfo_internal.DeserializeModelInfo_internal(item)); } continue; } if (property.NameEquals("nextLink")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } result.NextLink = property.Value.GetString(); continue; } } return(result); }