net.minidev.ovh.api.ApiOvhVip Maven / Gradle / Ivy
package net.minidev.ovh.api;
import com.fasterxml.jackson.core.type.TypeReference;
import java.io.IOException;
import java.util.ArrayList;
import net.minidev.ovh.api.services.OvhService;
import net.minidev.ovh.api.vip.OvhSupportVip;
import net.minidev.ovh.core.ApiOvhBase;
import net.minidev.ovh.core.ApiOvhCore;
/**
* BasePath:https://eu.api.ovh.com/1.0
* ResourcePath:/vip
* version:1.0
*/
public class ApiOvhVip extends ApiOvhBase {
public ApiOvhVip(ApiOvhCore core) {
super(core);
}
/**
* Get this object properties
*
* REST: GET /vip/{serviceName}/serviceInfos
* @param serviceName [required] The internal name of your VIP support offer
*/
public OvhService serviceName_serviceInfos_GET(String serviceName) throws IOException {
String qPath = "/vip/{serviceName}/serviceInfos";
StringBuilder sb = path(qPath, serviceName);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhService.class);
}
/**
* Alter this object properties
*
* REST: PUT /vip/{serviceName}/serviceInfos
* @param body [required] New object properties
* @param serviceName [required] The internal name of your VIP support offer
*/
public void serviceName_serviceInfos_PUT(String serviceName, OvhService body) throws IOException {
String qPath = "/vip/{serviceName}/serviceInfos";
StringBuilder sb = path(qPath, serviceName);
exec(qPath, "PUT", sb.toString(), body);
}
/**
* Get this object properties
*
* REST: GET /vip/{serviceName}
* @param serviceName [required] The internal name of your VIP support offer
*/
public OvhSupportVip serviceName_GET(String serviceName) throws IOException {
String qPath = "/vip/{serviceName}";
StringBuilder sb = path(qPath, serviceName);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhSupportVip.class);
}
/**
* List available services
*
* REST: GET /vip
*/
public ArrayList GET() throws IOException {
String qPath = "/vip";
StringBuilder sb = path(qPath);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, t1);
}
private static TypeReference> t1 = new TypeReference>() {};
}