All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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(); uriVariables.put("vmExtId", vmExtId); uriVariables.put("extId", extId); String path = UriComponentsBuilder.fromPath("/api/vmm/v4.0.a1/ahv/config/vms/{vmExtId}/cd-roms/{extId}/$actions/eject").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.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Retrieves configuration details for the provided CD-ROM device attached to a Virtual Machine. *

200 - Success. *

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.GetCdRomResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.GetCdRomResponse getCdRomByExtId(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 getCdRomByExtId"); } // verify the required parameter 'extId' is set if (extId == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling getCdRomByExtId"); } // 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.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Retrieves configuration details for the provided disk device attached to a Virtual Machine. *

200 - Success. *

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.GetDiskResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.GetDiskResponse getDiskByExtId(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 getDiskByExtId"); } // verify the required parameter 'extId' is set if (extId == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling getDiskByExtId"); } // 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.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Retrieves configuration details for the provided GPU device attached to a Virtual Machine. *

200 - Success. *

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.GetGpuResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.GetGpuResponse getGpuByExtId(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 getGpuByExtId"); } // verify the required parameter 'extId' is set if (extId == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling getGpuByExtId"); } // 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.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Retrieves configuration details for the provided network device attached to a Virtual Machine. *

200 - Success. *

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.GetNicResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.GetNicResponse getNicByExtId(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 getNicByExtId"); } // verify the required parameter 'extId' is set if (extId == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling getNicByExtId"); } // 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.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Retrieves configuration details for the provided serial port attached to a Virtual Machine. *

200 - Success. *

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.GetSerialPortResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.GetSerialPortResponse getSerialPortByExtId(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 getSerialPortByExtId"); } // verify the required parameter 'extId' is set if (extId == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling getSerialPortByExtId"); } // 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.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Retrieves configuration details for a Virtual Machine. *

200 - Success. *

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.GetVmResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.GetVmResponse getVmByExtId(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 getVmByExtId"); } // 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.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Retrieves the Nutanix Guest Tools configuration for a Virtual Machine. *

200 - Success. *

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.GetGuestToolsResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.GetGuestToolsResponse getVmGuestTools(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 getVmGuestTools"); } // 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}/guest-tools").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.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Collaborative reboot of a Virtual Machine, requesting Nutanix Guest Tools to trigger a reboot from within the VM. *

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.RebootVmResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.RebootVmResponse guestRebootVm(String extId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.GuestPowerOptions 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 guestRebootVm"); } // verify the required parameter 'body' is set if (body == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling guestRebootVm"); } // 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/guest-reboot").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); } /** * Collaborative shutdown of a Virtual Machine, requesting Nutanix Guest Tools to trigger a shutdown from within the VM. *

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.ShutdownVmResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.ShutdownVmResponse guestShutdownVm(String extId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.GuestPowerOptions 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 guestShutdownVm"); } // verify the required parameter 'body' is set if (body == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling guestShutdownVm"); } // 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/guest-shutdown").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); } /** * Inserts the defined ISO into a CD-ROM device attached 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 extId Globally unique identifier of a CD-ROM. It should be of type UUID. * @param body The body parameter * @param args Additional arguments * @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.InsertCdRomResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.InsertCdRomResponse insertCdRom(String vmExtId, String extId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.CdRomInsertParams 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 insertCdRom"); } // verify the required parameter 'extId' is set if (extId == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling insertCdRom"); } // verify the required parameter 'body' is set if (body == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling insertCdRom"); } // 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}/$actions/insert").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); } /** * Inserts the Nutanix Guest Tools installation and configuration ISO into 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.InsertVmGuestToolsResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.InsertVmGuestToolsResponse insertVmGuestTools(String extId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.GuestToolsInsertConfig 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 insertVmGuestTools"); } // verify the required parameter 'body' is set if (body == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling insertVmGuestTools"); } // 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}/guest-tools/$actions/insert-iso").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); } /** * Installs Nutanix Guest Tools in a Virtual Machine by using the provided credentials. *

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.InstallVmGuestToolsResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.InstallVmGuestToolsResponse installVmGuestTools(String extId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.GuestToolsInstallConfig 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 installVmGuestTools"); } // verify the required parameter 'body' is set if (body == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling installVmGuestTools"); } // 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}/guest-tools/$actions/install").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); } /** * Lists the CD-ROM devices attached to a Virtual Machine. *

200 - Success. *

4XX - Client error response *

5XX - Server error response * @param vmExtId Globally unique identifier of a VM. It should be of type UUID. * @param $page A URL query parameter that specifies the page number of the result set. Must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range will lead to no results being returned. * @param $limit A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided a default value of 50 records will be returned in the result set. * @param args Additional arguments * @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.ListCdRomsResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.ListCdRomsResponse listCdRoms(String vmExtId, Integer $page, Integer $limit, 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 listCdRoms"); } // 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(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "$page", $page)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "$limit", $limit)); 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.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Lists the disk devices attached to a Virtual Machine. *

200 - Success. *

4XX - Client error response *

5XX - Server error response * @param vmExtId Globally unique identifier of a VM. It should be of type UUID. * @param $page A URL query parameter that specifies the page number of the result set. Must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range will lead to no results being returned. * @param $limit A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided a default value of 50 records will be returned in the result set. * @param args Additional arguments * @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.ListDisksResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.ListDisksResponse listDisks(String vmExtId, Integer $page, Integer $limit, 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 listDisks"); } // 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(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "$page", $page)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "$limit", $limit)); 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.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Lists the GPU devices attached to a Virtual Machine. *

200 - Success. *

4XX - Client error response *

5XX - Server error response * @param vmExtId Globally unique identifier of a VM. It should be of type UUID. * @param $page A URL query parameter that specifies the page number of the result set. Must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range will lead to no results being returned. * @param $limit A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided a default value of 50 records will be returned in the result set. * @param $filter A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the OData V4.01 URL conventions. * For example, filter '$filter=name eq 'karbon-ntnx-1.0' would filter result on cluster name karbon-ntnx1.0, filter '$filter=startswith(name, 'C')' would filter on cluster name starting with C. * The filter can be applied on the following fields: *

    *
  • mode
  • *
  • vendor
  • *
* @param args Additional arguments * @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.ListGpusResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.ListGpusResponse listGpus(String vmExtId, Integer $page, Integer $limit, String $filter, 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 listGpus"); } // 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(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "$page", $page)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "$limit", $limit)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "$filter", $filter)); 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.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Lists the network devices attached to a Virtual Machine. *

200 - Success. *

4XX - Client error response *

5XX - Server error response * @param vmExtId Globally unique identifier of a VM. It should be of type UUID. * @param $page A URL query parameter that specifies the page number of the result set. Must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range will lead to no results being returned. * @param $limit A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided a default value of 50 records will be returned in the result set. * @param $filter A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the OData V4.01 URL conventions. * For example, filter '$filter=name eq 'karbon-ntnx-1.0' would filter result on cluster name karbon-ntnx1.0, filter '$filter=startswith(name, 'C')' would filter on cluster name starting with C. * The filter can be applied on the following fields: *

    *
  • networkInfo/subnet/extId
  • *
* @param args Additional arguments * @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.ListNicsResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.ListNicsResponse listNics(String vmExtId, Integer $page, Integer $limit, String $filter, 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 listNics"); } // 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(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "$page", $page)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "$limit", $limit)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "$filter", $filter)); 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.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Lists the serial ports attached to a Virtual Machine. *

200 - Success. *

4XX - Client error response *

5XX - Server error response * @param vmExtId Globally unique identifier of a VM. It should be of type UUID. * @param $page A URL query parameter that specifies the page number of the result set. Must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range will lead to no results being returned. * @param $limit A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided a default value of 50 records will be returned in the result set. * @param args Additional arguments * @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.ListSerialPortsResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.ListSerialPortsResponse listSerialPorts(String vmExtId, Integer $page, Integer $limit, 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 listSerialPorts"); } // 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(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "$page", $page)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "$limit", $limit)); 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.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Lists the Virtual Machines defined on the system. List of Virtual Machines can be further filtered out using various filtering options. *

200 - Success. *

4XX - Client error response *

5XX - Server error response * @param $page A URL query parameter that specifies the page number of the result set. Must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range will lead to no results being returned. * @param $limit A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided a default value of 50 records will be returned in the result set. * @param $filter A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the OData V4.01 URL conventions. * For example, filter '$filter=name eq 'karbon-ntnx-1.0' would filter result on cluster name karbon-ntnx1.0, filter '$filter=startswith(name, 'C')' would filter on cluster name starting with C. * The filter can be applied on the following fields: *

    *
  • cluster/extId
  • *
  • gpus
  • *
  • hardwareClockTimezone
  • *
  • host/extId
  • *
  • isAgentVm
  • *
  • isCpuPassthroughEnabled
  • *
  • isGpuConsoleEnabled
  • *
  • isLiveMigrateCapable
  • *
  • isMemoryOvercommitEnabled
  • *
  • isVcpuHardPinningEnabled
  • *
  • isVgaConsoleEnabled
  • *
  • machineType
  • *
  • memorySizeBytes
  • *
  • name
  • *
  • nics
  • *
  • numCoresPerSocket
  • *
  • numNumaNodes
  • *
  • numSockets
  • *
  • numThreadsPerCore
  • *
  • powerState
  • *
* @param $orderby A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified the resources will be sorted in ascending order by default. For example, '$orderby=templateName desc' would get all templates sorted by templateName in desc order. * The orderby can be applied to the following fields: *
    *
  • memorySizeBytes
  • *
  • name
  • *
  • numCoresPerSocket
  • *
  • numNumaNodes
  • *
  • numSockets
  • *
  • numThreadsPerCore
  • *
* @param args Additional arguments * @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.ListVmsResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.ListVmsResponse listVms(Integer $page, Integer $limit, String $filter, String $orderby, HashMap ... args) throws RestClientException { // Check for optional argument map HashMap argMap = args.length > 0 ? args[0] : new HashMap(); Object postBody = null; 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(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "$page", $page)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "$limit", $limit)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "$filter", $filter)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "$orderby", $orderby)); 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.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Migrates a network device attached to a Virtual Machine to another subnet. This can be used to move network devices between VLAN and VPC subnets. *

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.MigrateNicResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.MigrateNicResponse migrateNic(String vmExtId, String extId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.MigrateNicConfig 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 migrateNic"); } // verify the required parameter 'extId' is set if (extId == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling migrateNic"); } // verify the required parameter 'body' is set if (body == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling migrateNic"); } // 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/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); } /** * Force a power-cycle for a Virtual Machine. This operation is equivalent to requesting a VM power-off followed by the VM power-on. Power cycling a VM is slower than resetting it, but it will be creating a fresh instance of the Virtual Machine. When resetting, the same instance is restarted within the context of the running VM instance. *

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.PowerCycleVmResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.PowerCycleVmResponse powerCycleVm(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 powerCycleVm"); } // 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/power-cycle").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.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Force shutdown of a Virtual Machine. Equivalent to removing the power cable. Note: If any write operations are being made to any disk when this API is called, it might result in some data loss. *

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.PowerOffVmResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.PowerOffVmResponse powerOffVm(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 powerOffVm"); } // 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/power-off").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.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Turns a Virtual Machine on. *

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.PowerOnVmResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.PowerOnVmResponse powerOnVm(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 powerOnVm"); } // 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/power-on").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.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Collaborative reboot of a Virtual Machine through the ACPI support in the operating system. *

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.RebootVmResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.RebootVmResponse rebootVm(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 rebootVm"); } // 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/reboot").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.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Releases the IP address assignment from 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 args Additional arguments * @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.ReleaseIpResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.ReleaseIpResponse releaseIp(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 releaseIp"); } // verify the required parameter 'extId' is set if (extId == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling releaseIp"); } // 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/release-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 = { }; 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); } /** * Force reset of a Virtual Machine, without waiting for the guest VM to shutdown itself. Resetting a VM is faster than power-cycle as the reset occurs within the context of the running virtual machine instance rather than creating a fresh instance. *

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.ResetVmResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.ResetVmResponse resetVm(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 resetVm"); } // 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/reset").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.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Collaborative shutdown of a Virtual Machine through the ACPI support in the operating system. *

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.ShutdownVmResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.ShutdownVmResponse shutdownVm(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 shutdownVm"); } // 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/shutdown").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.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Trigger an in-guest uninstallation of Nutanix Guest Tools. *

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.UninstallVmGuestToolsResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.UninstallVmGuestToolsResponse uninstallVmGuestTools(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 uninstallVmGuestTools"); } // 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}/guest-tools/$actions/uninstall").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.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Updates the configuration details for the provided disk device. *

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 body The body parameter * @param args Additional arguments * @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.UpdateDiskResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.UpdateDiskResponse updateDisk(String vmExtId, String extId, 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 updateDisk"); } // verify the required parameter 'extId' is set if (extId == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling updateDisk"); } // verify the required parameter 'body' is set if (body == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling updateDisk"); } // 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 = { "application/json" }; final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); String[] authNames = new String[] { "basicAuthScheme" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Updates the configuration details for the provided network device. *

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.UpdateNicResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.UpdateNicResponse updateNic(String vmExtId, String extId, 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 updateNic"); } // verify the required parameter 'extId' is set if (extId == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling updateNic"); } // verify the required parameter 'body' is set if (body == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling updateNic"); } // 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 = { "application/json" }; final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); String[] authNames = new String[] { "basicAuthScheme" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Updates the configuration details for the provided serial port. *

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 body The body parameter * @param args Additional arguments * @return com.nutanix.dp1.vmm.vmm.v4.ahv.config.UpdateSerialPortResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.UpdateSerialPortResponse updateSerialPort(String vmExtId, String extId, 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 updateSerialPort"); } // verify the required parameter 'extId' is set if (extId == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling updateSerialPort"); } // verify the required parameter 'body' is set if (body == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling updateSerialPort"); } // 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 = { "application/json" }; final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); String[] authNames = new String[] { "basicAuthScheme" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Updates configuration details for 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.UpdateVmResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.UpdateVmResponse updateVm(String extId, 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 'extId' is set if (extId == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'extId' when calling updateVm"); } // verify the required parameter 'body' is set if (body == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling updateVm"); } // 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 = { "application/json" }; final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); String[] authNames = new String[] { "basicAuthScheme" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Updates the Nutanix Guest Tools configuration for 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.UpdateGuestToolsResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.UpdateGuestToolsResponse updateVmGuestTools(String extId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.GuestTools 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 updateVmGuestTools"); } // verify the required parameter 'body' is set if (body == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling updateVmGuestTools"); } // 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}/guest-tools").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.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Trigger an in-guest upgrade of Nutanix Guest Tools. *

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.UpgradeVmGuestToolsResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.vmm.vmm.v4.ahv.config.UpgradeVmGuestToolsResponse upgradeVmGuestTools(String extId, com.nutanix.dp1.vmm.vmm.v4.ahv.config.GuestToolsUpgradeConfig 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 upgradeVmGuestTools"); } // verify the required parameter 'body' is set if (body == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling upgradeVmGuestTools"); } // 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}/guest-tools/$actions/upgrade").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); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy