com.nutanix.vmm.java.client.api.VmApi Maven / Gradle / Ivy
package com.nutanix.vmm.java.client.api;
import com.nutanix.vmm.java.client.ApiClient;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.HashSet;
import java.util.Set;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.HttpClientErrorException;
import org.springframework.web.util.UriComponentsBuilder;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
@javax.annotation.Generated(value = "com.nutanix.swagger.codegen.generators.JavaClientSDKGenerator", date = "2023-08-18T03:46:19.074Z[Etc/UTC]")@Component("com.nutanix.vmm.java.client.api.VmApi")
public class VmApi {
private ApiClient apiClient;
private final Set headersToSkip;
public VmApi() {
this(new ApiClient());
}
@Autowired
public VmApi(ApiClient apiClient) {
this.apiClient = apiClient;
this.headersToSkip = new HashSet<>(Arrays.asList("authorization", "cookie", "ntnx-request-id", "host", "user-agent"));
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Assigns a specific IP address to a network device attached to a managed network.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param vmExtId Globally unique identifier of a VM. It should be of type UUID.
* @param extId Globally unique identifier of a VM NIC. It should be of type UUID.
* @param body The body parameter
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.AssignIpResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.AssignIpResponse assignIp(String vmExtId, String extId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.AssignIpParams body, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = body;
// verify the required parameter 'vmExtId' is set
if (vmExtId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'vmExtId' when calling assignIp");
}
// verify the required parameter 'extId' is set
if (extId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling assignIp");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling assignIp");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("vmExtId", vmExtId);
uriVariables.put("extId", extId);
String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms/{vmExtId}/nics/{extId}/$actions/assign-ip").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
argMap.forEach((key, value) -> {
if (!this.headersToSkip.contains(key.toLowerCase())) {
String stringValue = apiClient.parameterToString(value);
if (stringValue != null && !stringValue.trim().isEmpty()) {
headerParams.add(key, apiClient.parameterToString(value));
}
}
});
final String[] accepts = {
"application/json"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = {
"application/json"
};
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicAuthScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Assign the owner of a Virtual Machine.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param extId Globally unique identifier of a VM. It should be of type UUID.
* @param body The body parameter
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.AssignVmOwnerResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.AssignVmOwnerResponse assignVmOwner(String extId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.OwnershipInfo body, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = body;
// verify the required parameter 'extId' is set
if (extId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling assignVmOwner");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling assignVmOwner");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("extId", extId);
String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms/{extId}/$actions/assign-owner").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
argMap.forEach((key, value) -> {
if (!this.headersToSkip.contains(key.toLowerCase())) {
String stringValue = apiClient.parameterToString(value);
if (stringValue != null && !stringValue.trim().isEmpty()) {
headerParams.add(key, apiClient.parameterToString(value));
}
}
});
final String[] accepts = {
"application/json"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = {
"application/json"
};
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicAuthScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Associate categories to a Virtual Machine.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param extId Globally unique identifier of a VM. It should be of type UUID.
* @param body The body parameter
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.AssociateVmCategoriesResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.AssociateVmCategoriesResponse associateVmCategories(String extId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.AssociateVmCategoriesParams body, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = body;
// verify the required parameter 'extId' is set
if (extId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling associateVmCategories");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling associateVmCategories");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("extId", extId);
String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms/{extId}/$actions/associate-categories").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
argMap.forEach((key, value) -> {
if (!this.headersToSkip.contains(key.toLowerCase())) {
String stringValue = apiClient.parameterToString(value);
if (stringValue != null && !stringValue.trim().isEmpty()) {
headerParams.add(key, apiClient.parameterToString(value));
}
}
});
final String[] accepts = {
"application/json"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = {
"application/json"
};
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicAuthScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Clones an existing Virtual Machine. This operation also includes updating the existing configuration during the clone operation.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param extId Globally unique identifier of a VM. It should be of type UUID.
* @param body The body parameter
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.CloneVmResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.CloneVmResponse cloneVm(String extId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.CloneOverrideParams body, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = body;
// verify the required parameter 'extId' is set
if (extId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling cloneVm");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("extId", extId);
String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms/{extId}/$actions/clone").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
argMap.forEach((key, value) -> {
if (!this.headersToSkip.contains(key.toLowerCase())) {
String stringValue = apiClient.parameterToString(value);
if (stringValue != null && !stringValue.trim().isEmpty()) {
headerParams.add(key, apiClient.parameterToString(value));
}
}
});
final String[] accepts = {
"application/json"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = {
"application/json"
};
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicAuthScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Creates and attaches a CD-ROM device to a Virtual Machine.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param vmExtId Globally unique identifier of a VM. It should be of type UUID.
* @param body The body parameter
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.CreateCdRomResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.CreateCdRomResponse createCdRom(String vmExtId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.CdRom body, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = body;
// verify the required parameter 'vmExtId' is set
if (vmExtId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'vmExtId' when calling createCdRom");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling createCdRom");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("vmExtId", vmExtId);
String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms/{vmExtId}/cd-roms").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
argMap.forEach((key, value) -> {
if (!this.headersToSkip.contains(key.toLowerCase())) {
String stringValue = apiClient.parameterToString(value);
if (stringValue != null && !stringValue.trim().isEmpty()) {
headerParams.add(key, apiClient.parameterToString(value));
}
}
});
final String[] accepts = {
"application/json"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = {
"application/json"
};
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicAuthScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Creates and attaches a disk device to a Virtual Machine.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param vmExtId Globally unique identifier of a VM. It should be of type UUID.
* @param body The body parameter
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.CreateDiskResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.CreateDiskResponse createDisk(String vmExtId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.Disk body, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = body;
// verify the required parameter 'vmExtId' is set
if (vmExtId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'vmExtId' when calling createDisk");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling createDisk");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("vmExtId", vmExtId);
String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms/{vmExtId}/disks").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
argMap.forEach((key, value) -> {
if (!this.headersToSkip.contains(key.toLowerCase())) {
String stringValue = apiClient.parameterToString(value);
if (stringValue != null && !stringValue.trim().isEmpty()) {
headerParams.add(key, apiClient.parameterToString(value));
}
}
});
final String[] accepts = {
"application/json"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = {
"application/json"
};
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicAuthScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Attaches a GPU device to a Virtual Machine.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param vmExtId Globally unique identifier of a VM. It should be of type UUID.
* @param body The body parameter
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.CreateGpuResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.CreateGpuResponse createGpu(String vmExtId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.Gpu body, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = body;
// verify the required parameter 'vmExtId' is set
if (vmExtId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'vmExtId' when calling createGpu");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling createGpu");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("vmExtId", vmExtId);
String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms/{vmExtId}/gpus").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
argMap.forEach((key, value) -> {
if (!this.headersToSkip.contains(key.toLowerCase())) {
String stringValue = apiClient.parameterToString(value);
if (stringValue != null && !stringValue.trim().isEmpty()) {
headerParams.add(key, apiClient.parameterToString(value));
}
}
});
final String[] accepts = {
"application/json"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = {
"application/json"
};
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicAuthScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Creates and attaches a network device to a Virtual Machine.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param vmExtId Globally unique identifier of a VM. It should be of type UUID.
* @param body The body parameter
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.CreateNicResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.CreateNicResponse createNic(String vmExtId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.Nic body, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = body;
// verify the required parameter 'vmExtId' is set
if (vmExtId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'vmExtId' when calling createNic");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling createNic");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("vmExtId", vmExtId);
String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms/{vmExtId}/nics").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
argMap.forEach((key, value) -> {
if (!this.headersToSkip.contains(key.toLowerCase())) {
String stringValue = apiClient.parameterToString(value);
if (stringValue != null && !stringValue.trim().isEmpty()) {
headerParams.add(key, apiClient.parameterToString(value));
}
}
});
final String[] accepts = {
"application/json"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = {
"application/json"
};
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicAuthScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Creates and attaches a serial port device to a Virtual Machine.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param vmExtId Globally unique identifier of a VM. It should be of type UUID.
* @param body The body parameter
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.CreateSerialPortResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.CreateSerialPortResponse createSerialPort(String vmExtId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.SerialPort body, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = body;
// verify the required parameter 'vmExtId' is set
if (vmExtId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'vmExtId' when calling createSerialPort");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling createSerialPort");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("vmExtId", vmExtId);
String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms/{vmExtId}/serial-ports").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
argMap.forEach((key, value) -> {
if (!this.headersToSkip.contains(key.toLowerCase())) {
String stringValue = apiClient.parameterToString(value);
if (stringValue != null && !stringValue.trim().isEmpty()) {
headerParams.add(key, apiClient.parameterToString(value));
}
}
});
final String[] accepts = {
"application/json"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = {
"application/json"
};
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicAuthScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Creates a Virtual Machine with the provided configuration.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param body The body parameter
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.CreateVmResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.CreateVmResponse createVm(com.nutanix.dp1.vmm.vmm.v4.ahv.config.Vm body, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling createVm");
}
String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms").build().toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
argMap.forEach((key, value) -> {
if (!this.headersToSkip.contains(key.toLowerCase())) {
String stringValue = apiClient.parameterToString(value);
if (stringValue != null && !stringValue.trim().isEmpty()) {
headerParams.add(key, apiClient.parameterToString(value));
}
}
});
final String[] accepts = {
"application/json"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = {
"application/json"
};
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicAuthScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Migrates a VM (including its storage) from the current cluster to a new target cluster.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param extId Globally unique identifier of a VM. It should be of type UUID.
* @param body Migrates a VM (including its storage) from the current cluster to a new target cluster.
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.CrossClusterMigrateVmResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.CrossClusterMigrateVmResponse crossClusterMigrateVm(String extId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.VmCrossClusterMigrateParams body, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = body;
// verify the required parameter 'extId' is set
if (extId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling crossClusterMigrateVm");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling crossClusterMigrateVm");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("extId", extId);
String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms/{extId}/$actions/migrate").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
argMap.forEach((key, value) -> {
if (!this.headersToSkip.contains(key.toLowerCase())) {
String stringValue = apiClient.parameterToString(value);
if (stringValue != null && !stringValue.trim().isEmpty()) {
headerParams.add(key, apiClient.parameterToString(value));
}
}
});
final String[] accepts = {
"application/json"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = {
"application/json"
};
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicAuthScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Stage a Sysprep or cloud-init configuration file to be used by the guest for the next boot. Note that the Sysprep command must be used to generalize the Windows VMs before triggering this API call.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param extId Globally unique identifier of a VM. It should be of type UUID.
* @param body The body parameter
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.CustomizeGuestVmResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.CustomizeGuestVmResponse customizeGuest(String extId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.GuestCustomizationParams body, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = body;
// verify the required parameter 'extId' is set
if (extId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling customizeGuest");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling customizeGuest");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("extId", extId);
String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms/{extId}/$actions/customize-guest").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
argMap.forEach((key, value) -> {
if (!this.headersToSkip.contains(key.toLowerCase())) {
String stringValue = apiClient.parameterToString(value);
if (stringValue != null && !stringValue.trim().isEmpty()) {
headerParams.add(key, apiClient.parameterToString(value));
}
}
});
final String[] accepts = {
"application/json"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = {
"application/json"
};
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicAuthScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Removes the specified CD-ROM device from a Virtual Machine.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param vmExtId Globally unique identifier of a VM. It should be of type UUID.
* @param extId Globally unique identifier of a CD-ROM. It should be of type UUID.
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.DeleteCdRomResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.DeleteCdRomResponse deleteCdRom(String vmExtId, String extId, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = null;
// verify the required parameter 'vmExtId' is set
if (vmExtId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'vmExtId' when calling deleteCdRom");
}
// verify the required parameter 'extId' is set
if (extId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling deleteCdRom");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("vmExtId", vmExtId);
uriVariables.put("extId", extId);
String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms/{vmExtId}/cd-roms/{extId}").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
argMap.forEach((key, value) -> {
if (!this.headersToSkip.contains(key.toLowerCase())) {
String stringValue = apiClient.parameterToString(value);
if (stringValue != null && !stringValue.trim().isEmpty()) {
headerParams.add(key, apiClient.parameterToString(value));
}
}
});
final String[] accepts = {
"application/json"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = { };
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicAuthScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Removes the specified disk device from a Virtual Machine.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param vmExtId Globally unique identifier of a VM. It should be of type UUID.
* @param extId Globally unique identifier of a VM disk. It should be of type UUID.
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.DeleteDiskResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.DeleteDiskResponse deleteDisk(String vmExtId, String extId, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = null;
// verify the required parameter 'vmExtId' is set
if (vmExtId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'vmExtId' when calling deleteDisk");
}
// verify the required parameter 'extId' is set
if (extId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling deleteDisk");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("vmExtId", vmExtId);
uriVariables.put("extId", extId);
String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms/{vmExtId}/disks/{extId}").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
argMap.forEach((key, value) -> {
if (!this.headersToSkip.contains(key.toLowerCase())) {
String stringValue = apiClient.parameterToString(value);
if (stringValue != null && !stringValue.trim().isEmpty()) {
headerParams.add(key, apiClient.parameterToString(value));
}
}
});
final String[] accepts = {
"application/json"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = { };
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicAuthScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Removes the specified GPU device from a Virtual Machine.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param vmExtId Globally unique identifier of a VM. It should be of type UUID.
* @param extId Globally unique identifier of a VM GPU. It should be of type UUID.
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.DeleteGpuResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.DeleteGpuResponse deleteGpu(String vmExtId, String extId, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = null;
// verify the required parameter 'vmExtId' is set
if (vmExtId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'vmExtId' when calling deleteGpu");
}
// verify the required parameter 'extId' is set
if (extId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling deleteGpu");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("vmExtId", vmExtId);
uriVariables.put("extId", extId);
String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms/{vmExtId}/gpus/{extId}").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
argMap.forEach((key, value) -> {
if (!this.headersToSkip.contains(key.toLowerCase())) {
String stringValue = apiClient.parameterToString(value);
if (stringValue != null && !stringValue.trim().isEmpty()) {
headerParams.add(key, apiClient.parameterToString(value));
}
}
});
final String[] accepts = {
"application/json"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = { };
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicAuthScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Removes the specified network device from a Virtual Machine.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param vmExtId Globally unique identifier of a VM. It should be of type UUID.
* @param extId Globally unique identifier of a VM NIC. It should be of type UUID.
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.DeleteNicResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.DeleteNicResponse deleteNic(String vmExtId, String extId, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = null;
// verify the required parameter 'vmExtId' is set
if (vmExtId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'vmExtId' when calling deleteNic");
}
// verify the required parameter 'extId' is set
if (extId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling deleteNic");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("vmExtId", vmExtId);
uriVariables.put("extId", extId);
String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms/{vmExtId}/nics/{extId}").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
argMap.forEach((key, value) -> {
if (!this.headersToSkip.contains(key.toLowerCase())) {
String stringValue = apiClient.parameterToString(value);
if (stringValue != null && !stringValue.trim().isEmpty()) {
headerParams.add(key, apiClient.parameterToString(value));
}
}
});
final String[] accepts = {
"application/json"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = { };
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicAuthScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Removes the specified serial port from a Virtual Machine.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param vmExtId Globally unique identifier of a VM. It should be of type UUID.
* @param extId Globally unique identifier of a serial port. It should be of type UUID.
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.DeleteSerialPortResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.DeleteSerialPortResponse deleteSerialPort(String vmExtId, String extId, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = null;
// verify the required parameter 'vmExtId' is set
if (vmExtId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'vmExtId' when calling deleteSerialPort");
}
// verify the required parameter 'extId' is set
if (extId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling deleteSerialPort");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("vmExtId", vmExtId);
uriVariables.put("extId", extId);
String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms/{vmExtId}/serial-ports/{extId}").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
argMap.forEach((key, value) -> {
if (!this.headersToSkip.contains(key.toLowerCase())) {
String stringValue = apiClient.parameterToString(value);
if (stringValue != null && !stringValue.trim().isEmpty()) {
headerParams.add(key, apiClient.parameterToString(value));
}
}
});
final String[] accepts = {
"application/json"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = { };
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicAuthScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Delete the specified Virtual Machine.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param extId Globally unique identifier of a VM. It should be of type UUID.
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.DeleteVmResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.DeleteVmResponse deleteVm(String extId, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = null;
// verify the required parameter 'extId' is set
if (extId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling deleteVm");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("extId", extId);
String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms/{extId}").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
argMap.forEach((key, value) -> {
if (!this.headersToSkip.contains(key.toLowerCase())) {
String stringValue = apiClient.parameterToString(value);
if (stringValue != null && !stringValue.trim().isEmpty()) {
headerParams.add(key, apiClient.parameterToString(value));
}
}
});
final String[] accepts = {
"application/json"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = { };
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicAuthScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Disassociate categories from a Virtual Machine.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param extId Globally unique identifier of a VM. It should be of type UUID.
* @param body The body parameter
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.DisassociateVmCategoriesResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.DisassociateVmCategoriesResponse disassociateVmCategories(String extId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.DisassociateVmCategoriesParams body, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = body;
// verify the required parameter 'extId' is set
if (extId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling disassociateVmCategories");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling disassociateVmCategories");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("extId", extId);
String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms/{extId}/$actions/disassociate-categories").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
argMap.forEach((key, value) -> {
if (!this.headersToSkip.contains(key.toLowerCase())) {
String stringValue = apiClient.parameterToString(value);
if (stringValue != null && !stringValue.trim().isEmpty()) {
headerParams.add(key, apiClient.parameterToString(value));
}
}
});
final String[] accepts = {
"application/json"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = {
"application/json"
};
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicAuthScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Ejects the ISO currently inserted into a CD-ROM device on a Virtual Machine.
* 202 - Request Accepted
*
4XX - Client error response
*
5XX - Server error response
* @param vmExtId Globally unique identifier of a VM. It should be of type UUID.
* @param extId Globally unique identifier of a CD-ROM. It should be of type UUID.
* @param args Additional arguments
* @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.EjectCdRomResponse
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public com.nutanix.dp1.vmm.vmm.v4.ahv.config.EjectCdRomResponse ejectCdRom(String vmExtId, String extId, HashMap ... args) throws RestClientException {
// Check for optional argument map
HashMap argMap = args.length > 0 ? args[0] : new HashMap();
Object postBody = null;
// verify the required parameter 'vmExtId' is set
if (vmExtId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'vmExtId' when calling ejectCdRom");
}
// verify the required parameter 'extId' is set
if (extId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling ejectCdRom");
}
// create path and map variables
final Map uriVariables = new HashMap