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

com.nutanix.net.java.client.api.VpnVendorConfigApi Maven / Gradle / Ivy

Go to download

Manage networking configuration on Nutanix clusters, including AHV and advanced networking.

There is a newer version: 4.0.2-beta-1
Show newest version
package com.nutanix.net.java.client.api;

import com.nutanix.net.java.client.ApiClient;




import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

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-02-01T08:24:43.584Z[Etc/UTC]")@Component("com.nutanix.net.java.client.api.VpnVendorConfigApi")
public class VpnVendorConfigApi {
    private ApiClient apiClient;

    public VpnVendorConfigApi() {
        this(new ApiClient());
    }

    @Autowired
    public VpnVendorConfigApi(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return apiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    /**
     * Get VPN vendor device configuration steps. If device version is not specified the configuration steps of the latest available device version are returned.
     * 

200 - VPN device configuration steps. *

4XX - Client error response *

5XX - Server error response * @param vpnConnectionId VPN connection UUID. * @param vendorName VPN device vendor name. * @param deviceVersion VPN device version. * @param args Additional arguments * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ public String getVpnVendorConfig(String vpnConnectionId, String vendorName, String deviceVersion, 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 'vpnConnectionId' is set if (vpnConnectionId == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'vpnConnectionId' when calling getVpnVendorConfig"); } // verify the required parameter 'vendorName' is set if (vendorName == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'vendorName' when calling getVpnVendorConfig"); } // create path and map variables final Map uriVariables = new HashMap(); uriVariables.put("vpnConnectionId", vpnConnectionId); String path = UriComponentsBuilder.fromPath("/api/networking/v4.0.a1/config/vpn-vendor-configs/{vpnConnectionId}").buildAndExpand(uriVariables).toUriString(); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "vendorName", vendorName)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "deviceVersion", deviceVersion)); if (!CollectionUtils.isEmpty(argMap)) { if (argMap.containsKey(HttpHeaders.IF_MATCH) && argMap.get(HttpHeaders.IF_MATCH)!=null) { headerParams.add(HttpHeaders.IF_MATCH, apiClient.parameterToString(argMap.get(HttpHeaders.IF_MATCH))); } if (argMap.containsKey(HttpHeaders.IF_NONE_MATCH) && argMap.get(HttpHeaders.IF_NONE_MATCH)!=null) { headerParams.add(HttpHeaders.IF_NONE_MATCH, apiClient.parameterToString(argMap.get(HttpHeaders.IF_NONE_MATCH))); } } final String[] accepts = { "text/plain", "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); } /** * List third-party VPN vendors and devices for which configuration steps are available to download. *

200 - List of third-party VPN vendors and devices for which configuration steps are available to download. *

4XX - Client error response *

5XX - Server error response * @param vpnConnectionId VPN connection 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 0 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.net.networking.v4.config.VpnVendorListApiResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public com.nutanix.dp1.net.networking.v4.config.VpnVendorListApiResponse listAvailableVpnVendorConfigs(String vpnConnectionId, 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 'vpnConnectionId' is set if (vpnConnectionId == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'vpnConnectionId' when calling listAvailableVpnVendorConfigs"); } // create path and map variables final Map uriVariables = new HashMap(); uriVariables.put("vpnConnectionId", vpnConnectionId); String path = UriComponentsBuilder.fromPath("/api/networking/v4.0.a1/config/vpn-vendor-configs/{vpnConnectionId}/available").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)); if (!CollectionUtils.isEmpty(argMap)) { if (argMap.containsKey(HttpHeaders.IF_MATCH) && argMap.get(HttpHeaders.IF_MATCH)!=null) { headerParams.add(HttpHeaders.IF_MATCH, apiClient.parameterToString(argMap.get(HttpHeaders.IF_MATCH))); } if (argMap.containsKey(HttpHeaders.IF_NONE_MATCH) && argMap.get(HttpHeaders.IF_NONE_MATCH)!=null) { headerParams.add(HttpHeaders.IF_NONE_MATCH, apiClient.parameterToString(argMap.get(HttpHeaders.IF_NONE_MATCH))); } } 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); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy