private IntentImpl(IntentBuilder base) {
if (base.getKey() == null) {
this._key = new IntentKey(
base.getId()
);
this._id = base.getId();
} else {
this._key = base.getKey();
this._id = _key.getId();
}
this._actions = base.getActions();
this._conditions = base.getConditions();
this._constraints = base.getConstraints();
this._detailedStatusMessage = base.getDetailedStatusMessage();
this._qosConfig = base.getQosConfig();
this._state = base.getState();
this._status = base.getStatus();
this._subjects = base.getSubjects();
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.intents.Intent>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intents.Intent>> e = base.augmentation.entrySet().iterator().next();
this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intents.Intent>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intents.Intent>>singletonMap(e.getKey(), e.getValue());
break;
default :
this.augmentation = new HashMap<>(base.augmentation);
}
}