internal static FrontDoorOriginGroupListResult DeserializeFrontDoorOriginGroupListResult(JsonElement element) { Optional <IReadOnlyList <FrontDoorOriginGroupData> > value = default; Optional <string> nextLink = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <FrontDoorOriginGroupData> array = new List <FrontDoorOriginGroupData>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(FrontDoorOriginGroupData.DeserializeFrontDoorOriginGroupData(item)); } value = array; continue; } if (property.NameEquals("nextLink")) { nextLink = property.Value.GetString(); continue; } } return(new FrontDoorOriginGroupListResult(Optional.ToList(value), nextLink.Value)); }
protected async Task <FrontDoorOriginGroupResource> CreateAfdOriginGroup(ProfileResource profile, string originGroupName) { FrontDoorOriginGroupData input = ResourceDataHelper.CreateAfdOriginGroupData(); var lro = await profile.GetFrontDoorOriginGroups().CreateOrUpdateAsync(WaitUntil.Completed, originGroupName, input); return(lro.Value); }