internal static DomainCollection DeserializeDomainCollection(JsonElement element) { IReadOnlyList <AppServiceDomainData> value = default; Optional <string> nextLink = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value")) { List <AppServiceDomainData> array = new List <AppServiceDomainData>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(AppServiceDomainData.DeserializeAppServiceDomainData(item)); } value = array; continue; } if (property.NameEquals("nextLink")) { nextLink = property.Value.GetString(); continue; } } return(new DomainCollection(value, nextLink.Value)); }
AppServiceDomain IOperationSource <AppServiceDomain> .CreateResult(Response response, CancellationToken cancellationToken) { using var document = JsonDocument.Parse(response.ContentStream); var data = AppServiceDomainData.DeserializeAppServiceDomainData(document.RootElement); return(new AppServiceDomain(_armClient, data)); }