org.finra.herd.sdk.api.NamespaceApi Maven / Gradle / Ivy
/*
* herd-external
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* OpenAPI spec version: 0.125.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.finra.herd.sdk.api;
import com.sun.jersey.api.client.GenericType;
import org.finra.herd.sdk.invoker.ApiException;
import org.finra.herd.sdk.invoker.ApiClient;
import org.finra.herd.sdk.invoker.Configuration;
import org.finra.herd.sdk.model.*;
import org.finra.herd.sdk.invoker.Pair;
import org.finra.herd.sdk.model.ErrorInformation;
import org.finra.herd.sdk.model.Namespace;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-07-16T17:44:47.669-04:00[America/New_York]")
public class NamespaceApi {
private ApiClient apiClient;
public NamespaceApi() {
this(Configuration.getDefaultApiClient());
}
public NamespaceApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* getNamespace
* Gets an existing namespace by namespace code.
* @param namespaceCode the namespace code (required)
* @return Namespace
* @throws ApiException if fails to make API call
*/
public Namespace namespaceGetNamespace(String namespaceCode) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'namespaceCode' is set
if (namespaceCode == null) {
throw new ApiException(400, "Missing the required parameter 'namespaceCode' when calling namespaceGetNamespace");
}
// create path and map variables
String localVarPath = "/namespaces/{namespaceCode}"
.replaceAll("\\{" + "namespaceCode" + "\\}", apiClient.escapeString(namespaceCode.toString()));
// query params
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}