public ActionsBuilder setOrder(final java.lang.Short value) { if (value != null) { checkOrderRange(value); } this._order = value; return this; }
public ActionsBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Actions>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Actions> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
protected List<Actions> createActions() { List<Actions> actionsList = new ArrayList<Actions>(); short order = 1; for (String act : this.actions) { org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.actions.Action action = null; if (act.equalsIgnoreCase("ALLOW")) { action = new org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.actions.action .AllowBuilder().setAllow(new AllowBuilder().build()).build(); } else if (act.equalsIgnoreCase("BLOCK")) { action = new org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.actions.action .BlockBuilder().setBlock(new BlockBuilder().build()).build(); } else { continue; } Actions intentActions = new ActionsBuilder().setOrder(order).setAction(action).build(); actionsList.add(intentActions); order++; } return actionsList; }
private ActionsImpl(ActionsBuilder base) { if (base.getKey() == null) { this._key = new ActionsKey( base.getOrder() ); this._order = base.getOrder(); } else { this._key = base.getKey(); this._order = _key.getOrder(); } this._action = base.getAction(); switch (base.augmentation.size()) { case 0: this.augmentation = Collections.emptyMap(); break; case 1: final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Actions>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Actions>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Actions>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Actions>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
new ActionsBuilder().setOrder((short) 1).setAction( new org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.actions.action .AllowBuilder().setAllow(new AllowBuilder().build()).build()).build()));
private ActionsImpl(ActionsBuilder base) { if (base.getKey() == null) { this._key = new ActionsKey( base.getOrder() ); this._order = base.getOrder(); } else { this._key = base.getKey(); this._order = _key.getOrder(); } this._action = base.getAction(); switch (base.augmentation.size()) { case 0: this.augmentation = Collections.emptyMap(); break; case 1: final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Actions>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Actions>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Actions>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Actions>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
public ActionsBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Actions>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Actions> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
public ActionsBuilder setOrder(java.lang.Short value) { if (value != null) { checkOrderRange(value); } this._order = value; return this; } /**