com.katalon.testops.api.TestProjectApi Maven / Gradle / Ivy
Show all versions of testops-client-openapi Show documentation
package com.katalon.testops.api;
import com.katalon.testops.ApiClient;
import com.katalon.testops.model.BuildInfo;
import com.katalon.testops.model.GitRepositoryResource;
import com.katalon.testops.model.SchedulerResource;
import com.katalon.testops.model.TestProjectResource;
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.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;
@Component("com.katalon.testops.api.TestProjectApi")
public class TestProjectApi {
private ApiClient apiClient;
public TestProjectApi() {
this(new ApiClient());
}
@Autowired
public TestProjectApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Creates a new schedule for a Test Plan. Returns the created schedule detail.
*
* 200 - OK
* @param body The body parameter
* @param id The id parameter
* @return SchedulerResource
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public SchedulerResource create6(SchedulerResource body, Long id) throws RestClientException {
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 create6");
}
// verify the required parameter 'id' is set
if (id == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'id' when calling create6");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("id", id);
String path = UriComponentsBuilder.fromPath("/api/v1/test-projects/{id}/schedulers").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
final String[] accepts = {
"*/*"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = {
"application/json"
};
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Creates a Git Test Project. Returns the Git Test Project detail.
*
* 200 - OK
* @param body The body parameter
* @return GitRepositoryResource
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public GitRepositoryResource createGitRepo(GitRepositoryResource body) throws RestClientException {
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 createGitRepo");
}
String path = UriComponentsBuilder.fromPath("/api/v1/git/create").build().toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
final String[] accepts = {
"*/*"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = {
"application/json"
};
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Creates a new sample Test Project. Returns the created Test Project.
*
* 200 - OK
* @param name The name parameter
* @param type The type parameter
* @param projectId The projectId parameter
* @return TestProjectResource
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public TestProjectResource createSample(String name, String type, Long projectId) throws RestClientException {
Object postBody = null;
// verify the required parameter 'name' is set
if (name == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'name' when calling createSample");
}
// verify the required parameter 'type' is set
if (type == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'type' when calling createSample");
}
// verify the required parameter 'projectId' is set
if (projectId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'projectId' when calling createSample");
}
String path = UriComponentsBuilder.fromPath("/api/v1/test-projects/sample").build().toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "name", name));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "type", type));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "projectId", projectId));
final String[] accepts = {
"*/*"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = { };
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Deletes a Test Project. Returns the deleted Test Project.
*
* 200 - OK
* @param id The id parameter
* @return TestProjectResource
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public TestProjectResource delete6(Long id) throws RestClientException {
Object postBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'id' when calling delete6");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("id", id);
String path = UriComponentsBuilder.fromPath("/api/v1/test-projects/{id}").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
final String[] accepts = {
"*/*"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = { };
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Deletes a schedule. Returns the deleted schedule detail.
*
* 200 - OK
* @param id The id parameter
* @param schedulerId The schedulerId parameter
* @return SchedulerResource
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public SchedulerResource delete7(Long id, Long schedulerId) throws RestClientException {
Object postBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'id' when calling delete7");
}
// verify the required parameter 'schedulerId' is set
if (schedulerId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'schedulerId' when calling delete7");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("id", id);
uriVariables.put("schedulerId", schedulerId);
String path = UriComponentsBuilder.fromPath("/api/v1/test-projects/{id}/schedulers/{schedulerId}").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
final String[] accepts = {
"*/*"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = { };
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Downloads a Test Project package. Returns the latest Test Project package file.
*
* 200 - OK
* @param id The id parameter
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public void download4(Long id) throws RestClientException {
Object postBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'id' when calling download4");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("id", id);
String path = UriComponentsBuilder.fromPath("/api/v1/test-projects/{id}/download").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
final String[] accepts = { };
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = { };
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Returns a Test Project detail.
*
* 200 - OK
* @param id The id parameter
* @return TestProjectResource
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public TestProjectResource get17(Long id) throws RestClientException {
Object postBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'id' when calling get17");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("id", id);
String path = UriComponentsBuilder.fromPath("/api/v1/test-projects/{id}").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
final String[] accepts = {
"*/*"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = { };
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Returns a schedule detail.
*
* 200 - OK
* @param id The id parameter
* @param schedulerId The schedulerId parameter
* @return SchedulerResource
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public SchedulerResource getScheduler(Long id, Long schedulerId) throws RestClientException {
Object postBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'id' when calling getScheduler");
}
// verify the required parameter 'schedulerId' is set
if (schedulerId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'schedulerId' when calling getScheduler");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("id", id);
uriVariables.put("schedulerId", schedulerId);
String path = UriComponentsBuilder.fromPath("/api/v1/test-projects/{id}/schedulers/{schedulerId}").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
final String[] accepts = {
"*/*"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = { };
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Returns a Git Test Project detail.
*
* 200 - OK
* @param testProjectGitId The testProjectGitId parameter
* @return GitRepositoryResource
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public GitRepositoryResource getTestProjectGit(Long testProjectGitId) throws RestClientException {
Object postBody = null;
// verify the required parameter 'testProjectGitId' is set
if (testProjectGitId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'testProjectGitId' when calling getTestProjectGit");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("testProjectGitId", testProjectGitId);
String path = UriComponentsBuilder.fromPath("/api/v1/git/{testProjectGitId}").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
final String[] accepts = {
"*/*"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = { };
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Refresh Test Suite Collection list of Git Test Project
*
* 204 - No Content
* @param id The id parameter
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public void refreshTSC(Long id) throws RestClientException {
Object postBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'id' when calling refreshTSC");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("id", id);
String path = UriComponentsBuilder.fromPath("/api/v1/test-projects/{id}/refresh-tsc").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
final String[] accepts = { };
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = { };
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Executes a Test Plan. Returns the build information.
*
* 200 - OK
* @param id The id parameter
* @return List<BuildInfo>
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public List run(Long id) throws RestClientException {
Object postBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'id' when calling run");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("id", id);
String path = UriComponentsBuilder.fromPath("/api/v1/run-configurations/{id}/execute").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
final String[] accepts = {
"*/*"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = { };
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicScheme" };
ParameterizedTypeReference> returnType = new ParameterizedTypeReference>() {};
return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Updates a Test Project detail. Returns the updated Test Project detail.
*
* 200 - OK
* @param body The body parameter
* @param id The id parameter
* @return TestProjectResource
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public TestProjectResource update10(TestProjectResource body, Long id) throws RestClientException {
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 update10");
}
// verify the required parameter 'id' is set
if (id == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'id' when calling update10");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("id", id);
String path = UriComponentsBuilder.fromPath("/api/v1/test-projects/{id}").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
final String[] accepts = {
"*/*"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = {
"application/json"
};
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Updates a schedule detail. Returns the updated schedule detail.
*
* 200 - OK
* @param body The body parameter
* @param id The id parameter
* @param schedulerId The schedulerId parameter
* @return SchedulerResource
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public SchedulerResource update9(SchedulerResource body, Long id, Long schedulerId) throws RestClientException {
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 update9");
}
// verify the required parameter 'id' is set
if (id == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'id' when calling update9");
}
// verify the required parameter 'schedulerId' is set
if (schedulerId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'schedulerId' when calling update9");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("id", id);
uriVariables.put("schedulerId", schedulerId);
String path = UriComponentsBuilder.fromPath("/api/v1/test-projects/{id}/schedulers/{schedulerId}").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
final String[] accepts = {
"*/*"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = {
"application/json"
};
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Updates a Git Test Project detail. Returns the updated Git Test Project detail.
*
* 200 - OK
* @param body The body parameter
* @return GitRepositoryResource
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public GitRepositoryResource updateGitRepo(GitRepositoryResource body) throws RestClientException {
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 updateGitRepo");
}
String path = UriComponentsBuilder.fromPath("/api/v1/git/update").build().toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
final String[] accepts = {
"*/*"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = {
"application/json"
};
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Update a Test Project package. Returns the updated Test Project detail.
*
* 200 - OK
* @param id The id parameter
* @param batch The batch parameter
* @param folderPath The folderPath parameter
* @param fileName The fileName parameter
* @param uploadedPath The uploadedPath parameter
* @return TestProjectResource
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public TestProjectResource updatePackage(Long id, String batch, String folderPath, String fileName, String uploadedPath) throws RestClientException {
Object postBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'id' when calling updatePackage");
}
// verify the required parameter 'batch' is set
if (batch == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'batch' when calling updatePackage");
}
// verify the required parameter 'folderPath' is set
if (folderPath == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'folderPath' when calling updatePackage");
}
// verify the required parameter 'fileName' is set
if (fileName == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'fileName' when calling updatePackage");
}
// verify the required parameter 'uploadedPath' is set
if (uploadedPath == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'uploadedPath' when calling updatePackage");
}
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("id", id);
String path = UriComponentsBuilder.fromPath("/api/v1/test-projects/{id}/update-package").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "batch", batch));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "folderPath", folderPath));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "fileName", fileName));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "uploadedPath", uploadedPath));
final String[] accepts = {
"*/*"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = { };
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
* Creates a new Test Project. Returns the created Test Project.
*
* 200 - OK
* @param name The name parameter
* @param projectId The projectId parameter
* @param batch The batch parameter
* @param folderPath The folderPath parameter
* @param fileName The fileName parameter
* @param uploadedPath The uploadedPath parameter
* @param description The description parameter
* @return TestProjectResource
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public TestProjectResource upload1(String name, String projectId, String batch, String folderPath, String fileName, String uploadedPath, String description) throws RestClientException {
Object postBody = null;
// verify the required parameter 'name' is set
if (name == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'name' when calling upload1");
}
// verify the required parameter 'projectId' is set
if (projectId == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'projectId' when calling upload1");
}
// verify the required parameter 'batch' is set
if (batch == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'batch' when calling upload1");
}
// verify the required parameter 'folderPath' is set
if (folderPath == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'folderPath' when calling upload1");
}
// verify the required parameter 'fileName' is set
if (fileName == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'fileName' when calling upload1");
}
// verify the required parameter 'uploadedPath' is set
if (uploadedPath == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'uploadedPath' when calling upload1");
}
String path = UriComponentsBuilder.fromPath("/api/v1/test-projects/upload").build().toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap formParams = new LinkedMultiValueMap();
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "name", name));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "description", description));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "projectId", projectId));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "batch", batch));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "folderPath", folderPath));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "fileName", fileName));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "uploadedPath", uploadedPath));
final String[] accepts = {
"*/*"
};
final List accept = apiClient.selectHeaderAccept(accepts);
final String[] contentTypes = { };
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { "basicScheme" };
ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
}