package org.wso2.carbon.device.mgt.ios.payload.beans;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.wso2.carbon.device.mgt.ios.payload.exception.ProfileConfigurationException;

@ApiModel(value = "RemoveApplication",
        description = "Information related to remove application.")
public class RemoveApplication extends CommandOperation {

    @ApiModelProperty(name = "bundleId",
            value = "BundleId to be removed.", required = true)
    private String bundleId;

    @ApiModelProperty(name = "url", value = "url of a webclip.", required = true)
    private String url;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getBundleId() {
        return bundleId;
    }


    public void setBundleId(String bundleId) {
        this.bundleId = bundleId;
    }

    @Override
    public void validateRequest() throws ProfileConfigurationException {

        if (bundleId == null || bundleId.trim().isEmpty()) {
            throw new ProfileConfigurationException("Application bundle ID cannot be empty");
        }

    }
}
