use of com.arm.mbed.cloud.sdk.internal.updateservice.model.UpdateCampaignPage in project mbed-cloud-sdk-java by ARMmbed.
the class CampaignAdapter method mapList.
/**
* Maps a list of campaigns.
*
* @param list
* campaign page.
* @return a list of campaigns
*/
public static ListResponse<Campaign> mapList(UpdateCampaignPage list) {
final UpdateCampaignPage campaignList = list;
final RespList<UpdateCampaign> respList = new RespList<UpdateCampaign>() {
@Override
public Boolean getHasMore() {
return (campaignList == null) ? null : campaignList.isHasMore();
}
@Override
public Integer getTotalCount() {
return (campaignList == null) ? null : campaignList.getTotalCount();
}
@Override
public String getAfter() {
return (campaignList == null) ? null : campaignList.getAfter();
}
@Override
public Integer getLimit() {
return (campaignList == null) ? null : campaignList.getLimit();
}
@Override
public String getOrder() {
return (campaignList == null) ? null : campaignList.getOrder().toString();
}
@Override
public List<UpdateCampaign> getData() {
return (campaignList == null) ? null : campaignList.getData();
}
};
return GenericAdapter.mapList(respList, getMapper());
}
Aggregations