2 * Copyright (c) 2016 Red Hat, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.mdsal.binding.testutils;
10 import java.util.Collections;
11 import org.eclipse.xtext.xbase.lib.CollectionLiterals;
12 import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.TreeComplexUsesAugment;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.TreeComplexUsesAugmentBuilder;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.complex.from.grouping.ContainerWithUses;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.complex.from.grouping.ContainerWithUsesBuilder;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.Top;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.TopBuilder;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelList;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelListBuilder;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelListKey;
24 * The object initialization code in this class was generated by AssertDataObjects.
26 * @see AssertDataObjects
27 * @see AssertDataObjectsTest
29 public final class ExpectedObjects {
31 private ExpectedObjects() {
35 public static TopLevelList topLevelList() {
36 TopLevelListBuilder it = new TopLevelListBuilder();
37 TopLevelListKey topLevelListKey = new TopLevelListKey("foo");
38 it.withKey(topLevelListKey);
40 TreeComplexUsesAugmentBuilder treeComplexUsesAugmentBuilder = new TreeComplexUsesAugmentBuilder();
41 ContainerWithUsesBuilder containerWithUsesBuilder = new ContainerWithUsesBuilder();
42 containerWithUsesBuilder.setLeafFromGrouping("foo");
43 ContainerWithUses containerWithUses = containerWithUsesBuilder.build();
44 treeComplexUsesAugmentBuilder.setContainerWithUses(containerWithUses);
45 TreeComplexUsesAugment treeComplexUsesAugment = treeComplexUsesAugmentBuilder.build();
46 it.addAugmentation(TreeComplexUsesAugment.class, treeComplexUsesAugment);
50 public static Top top() {
51 TopBuilder topBuilder = new TopBuilder();
52 final Procedure1<TopBuilder> _function = (TopBuilder it) -> {
53 TopLevelListBuilder topLevelListBuilder = new TopLevelListBuilder();
54 final Procedure1<TopLevelListBuilder> _function_1 = (TopLevelListBuilder it1) -> {
56 TreeComplexUsesAugmentBuilder treeComplexUsesAugmentBuilder = new TreeComplexUsesAugmentBuilder();
57 final Procedure1<TreeComplexUsesAugmentBuilder> _function_2 = (TreeComplexUsesAugmentBuilder it2) -> {
58 ContainerWithUsesBuilder containerWithUsesBuilder = new ContainerWithUsesBuilder();
59 final Procedure1<ContainerWithUsesBuilder> _function_3 =
60 (ContainerWithUsesBuilder it3) -> it3.setLeafFromGrouping("foo");
61 ContainerWithUses doubleGreaterThan = XtendBuilderExtensions.operator_doubleGreaterThan(
62 containerWithUsesBuilder, _function_3);
63 it2.setContainerWithUses(doubleGreaterThan);
65 TreeComplexUsesAugment doubleGreaterThan = XtendBuilderExtensions.operator_doubleGreaterThan(
66 treeComplexUsesAugmentBuilder, _function_2);
67 it1.addAugmentation(TreeComplexUsesAugment.class, doubleGreaterThan);
69 TopLevelList doubleGreaterThan =
70 XtendBuilderExtensions.operator_doubleGreaterThan(topLevelListBuilder, _function_1);
71 it.setTopLevelList(Collections.unmodifiableList(CollectionLiterals.newArrayList(doubleGreaterThan)));
73 return XtendBuilderExtensions.operator_doubleGreaterThan(topBuilder, _function);