return response;
}
@Override
public AutoScalePolicyResponse createAutoScalePolicyResponse(AutoScalePolicy policy) {
AutoScalePolicyResponse response = new AutoScalePolicyResponse();
response.setId(policy.getUuid());
response.setDuration(policy.getDuration());
response.setQuietTime(policy.getQuietTime());
response.setAction(policy.getAction());
List<ConditionVO> vos = ApiDBUtils.getAutoScalePolicyConditions(policy.getId());
ArrayList<ConditionResponse> conditions = new ArrayList<ConditionResponse>(vos.size());
for (ConditionVO vo : vos) {
conditions.add(createConditionResponse(vo));
}
response.setConditions(conditions);
response.setObjectName("autoscalepolicy");
// Populates the account information in the response
populateOwner(response, policy);
return response;