}
private static final APIContext toDataModel(com.alu.e3.prov.restapi.model.ApiContext context) {
if (context==null) throw new IllegalArgumentException("environment must not be null");
APIContext apiContext = new APIContext();
apiContext.setId (context.getId());
apiContext.setDefaultContext (context.isDefaultContext());
apiContext.setStatus (toDataModel(context.getStatus()));
apiContext.setMaxRateLimitTPMThreshold (context.getMaxRateLimitTPMThreshold());
apiContext.setMaxRateLimitTPMWarning (context.getMaxRateLimitTPMWarning());
apiContext.setMaxRateLimitTPSThreshold (context.getMaxRateLimitTPSThreshold());
apiContext.setMaxRateLimitTPSWarning (context.getMaxRateLimitTPSWarning());
if (context.getLoadBalancing() != null)
apiContext.setLoadBalancing (toDataModel(context.getLoadBalancing()));
// Since the addition of MO call support
// We can have no TargetHosts
if (context.getTargetHosts()!=null)
apiContext.getTargetHosts().addAll (BeanConverterUtil.<TargetHost, com.alu.e3.prov.restapi.model.TargetHost>toDataModels(context.getTargetHosts()));
return apiContext;
}