use of com.arm.mbed.cloud.sdk.annotations.Internal in project mbed-cloud-sdk-java by ARMmbed.
the class Update method modifyCampaign.
/**
* Modifies an update campaign.
*
* @param campaign
* campaign to modify.
* @param actionName
* name of the modification action.
* @return modified campaign.
* @throws MbedCloudException
* if a problem occurred during request processing.
*/
@Internal
private Campaign modifyCampaign(Campaign campaign, String actionName) throws MbedCloudException {
checkNotNull(campaign, TAG_CAMPAIGN);
checkNotNull(campaign.getId(), TAG_CAMPAIGN_ID);
checkModelValidity(campaign, TAG_CAMPAIGN);
final Campaign finalCampaign = campaign;
return CloudCaller.call(this, actionName, CampaignAdapter.getMapper(), new CloudCall<UpdateCampaign>() {
@Override
public Call<UpdateCampaign> call() {
return endpoint.getUpdate().updateCampaignUpdate(finalCampaign.getId(), CampaignAdapter.reverseMapUpdate(finalCampaign));
}
});
}
Aggregations