Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package io.logicdrop.openapi.jersey.api;
import io.logicdrop.openapi.jersey.ApiException;
import io.logicdrop.openapi.jersey.ApiClient;
import io.logicdrop.openapi.jersey.ApiResponse;
import io.logicdrop.openapi.jersey.Configuration;
import io.logicdrop.openapi.jersey.Pair;
import javax.ws.rs.core.GenericType;
import io.logicdrop.openapi.models.ArtifactResponse;
import io.logicdrop.openapi.models.DeleteArtifactRequest;
import java.io.File;
import io.logicdrop.openapi.models.GenerateTemplateRequest;
import io.logicdrop.openapi.models.InlineResponse200;
import io.logicdrop.openapi.models.Template;
import io.logicdrop.openapi.models.UpdateArtifactRequest;
import io.logicdrop.openapi.models.UpdateTemplateResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class TemplateServicesApi {
private ApiClient apiClient;
public TemplateServicesApi() {
this(Configuration.getDefaultApiClient());
}
public TemplateServicesApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Delete template
*
* @param client Client name (required)
* @param project Project name (required)
* @param artifact Template name (required)
* @param v Template version (optional)
* @return ArtifactResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Results of the operation
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public ArtifactResponse deleteTemplate(String client, String project, String artifact, String v) throws ApiException {
return deleteTemplateWithHttpInfo(client, project, artifact, v).getData();
}
/**
* Delete template
*
* @param client Client name (required)
* @param project Project name (required)
* @param artifact Template name (required)
* @param v Template version (optional)
* @return ApiResponse<ArtifactResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Results of the operation
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public ApiResponse deleteTemplateWithHttpInfo(String client, String project, String artifact, String v) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(400, "Missing the required parameter 'client' when calling deleteTemplate");
}
// verify the required parameter 'project' is set
if (project == null) {
throw new ApiException(400, "Missing the required parameter 'project' when calling deleteTemplate");
}
// verify the required parameter 'artifact' is set
if (artifact == null) {
throw new ApiException(400, "Missing the required parameter 'artifact' when calling deleteTemplate");
}
// create path and map variables
String localVarPath = "/templates/{client}/{project}/{artifact}"
.replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString()))
.replaceAll("\\{" + "project" + "\\}", apiClient.escapeString(project.toString()))
.replaceAll("\\{" + "artifact" + "\\}", apiClient.escapeString(artifact.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "v", v));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api", "jwt", "oauth2" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("TemplateServicesApi.deleteTemplate", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Delete templates
*
* @param client Client name (required)
* @param project Project name (required)
* @param deleteArtifactRequest Remove templates by criteria (required)
* @return ArtifactResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Results of the operation
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public ArtifactResponse deleteTemplates(String client, String project, DeleteArtifactRequest deleteArtifactRequest) throws ApiException {
return deleteTemplatesWithHttpInfo(client, project, deleteArtifactRequest).getData();
}
/**
* Delete templates
*
* @param client Client name (required)
* @param project Project name (required)
* @param deleteArtifactRequest Remove templates by criteria (required)
* @return ApiResponse<ArtifactResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Results of the operation
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public ApiResponse deleteTemplatesWithHttpInfo(String client, String project, DeleteArtifactRequest deleteArtifactRequest) throws ApiException {
Object localVarPostBody = deleteArtifactRequest;
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(400, "Missing the required parameter 'client' when calling deleteTemplates");
}
// verify the required parameter 'project' is set
if (project == null) {
throw new ApiException(400, "Missing the required parameter 'project' when calling deleteTemplates");
}
// verify the required parameter 'deleteArtifactRequest' is set
if (deleteArtifactRequest == null) {
throw new ApiException(400, "Missing the required parameter 'deleteArtifactRequest' when calling deleteTemplates");
}
// create path and map variables
String localVarPath = "/templates/{client}/{project}"
.replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString()))
.replaceAll("\\{" + "project" + "\\}", apiClient.escapeString(project.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api", "jwt", "oauth2" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("TemplateServicesApi.deleteTemplates", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Generate template
* Generate template
* @param client Client name (required)
* @param project Project name (required)
* @param artifact Template name (required)
* @param v Template version (optional)
* @param generateTemplateRequest (optional)
* @return InlineResponse200
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
The generated content
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public InlineResponse200 generateTemplate(String client, String project, String artifact, String v, GenerateTemplateRequest generateTemplateRequest) throws ApiException {
return generateTemplateWithHttpInfo(client, project, artifact, v, generateTemplateRequest).getData();
}
/**
* Generate template
* Generate template
* @param client Client name (required)
* @param project Project name (required)
* @param artifact Template name (required)
* @param v Template version (optional)
* @param generateTemplateRequest (optional)
* @return ApiResponse<InlineResponse200>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
The generated content
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public ApiResponse generateTemplateWithHttpInfo(String client, String project, String artifact, String v, GenerateTemplateRequest generateTemplateRequest) throws ApiException {
Object localVarPostBody = generateTemplateRequest;
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(400, "Missing the required parameter 'client' when calling generateTemplate");
}
// verify the required parameter 'project' is set
if (project == null) {
throw new ApiException(400, "Missing the required parameter 'project' when calling generateTemplate");
}
// verify the required parameter 'artifact' is set
if (artifact == null) {
throw new ApiException(400, "Missing the required parameter 'artifact' when calling generateTemplate");
}
// create path and map variables
String localVarPath = "/templates/{client}/{project}/{artifact}/generate"
.replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString()))
.replaceAll("\\{" + "project" + "\\}", apiClient.escapeString(project.toString()))
.replaceAll("\\{" + "artifact" + "\\}", apiClient.escapeString(artifact.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "v", v));
final String[] localVarAccepts = {
"*/*"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api", "jwt", "oauth2" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("TemplateServicesApi.generateTemplate", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Get template
* Get an template
* @param client Client name (required)
* @param project Project name (required)
* @param artifact Template name (required)
* @param v Template version (optional)
* @param view Fields to return in the results (optional, default to new ArrayList<>())
* @return Template
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Retrieved template
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public Template getTemplate(String client, String project, String artifact, String v, List view) throws ApiException {
return getTemplateWithHttpInfo(client, project, artifact, v, view).getData();
}
/**
* Get template
* Get an template
* @param client Client name (required)
* @param project Project name (required)
* @param artifact Template name (required)
* @param v Template version (optional)
* @param view Fields to return in the results (optional, default to new ArrayList<>())
* @return ApiResponse<Template>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Retrieved template
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public ApiResponse getTemplateWithHttpInfo(String client, String project, String artifact, String v, List view) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(400, "Missing the required parameter 'client' when calling getTemplate");
}
// verify the required parameter 'project' is set
if (project == null) {
throw new ApiException(400, "Missing the required parameter 'project' when calling getTemplate");
}
// verify the required parameter 'artifact' is set
if (artifact == null) {
throw new ApiException(400, "Missing the required parameter 'artifact' when calling getTemplate");
}
// create path and map variables
String localVarPath = "/templates/{client}/{project}/{artifact}"
.replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString()))
.replaceAll("\\{" + "project" + "\\}", apiClient.escapeString(project.toString()))
.replaceAll("\\{" + "artifact" + "\\}", apiClient.escapeString(artifact.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "v", v));
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "view", view));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api", "jwt", "oauth2" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("TemplateServicesApi.getTemplate", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Get content
* Get template content
* @param client Client name (required)
* @param project Project name (required)
* @param artifact Template name (required)
* @param v Template version (optional)
* @return String
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Retrieved content
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public String getTemplateContent(String client, String project, String artifact, String v) throws ApiException {
return getTemplateContentWithHttpInfo(client, project, artifact, v).getData();
}
/**
* Get content
* Get template content
* @param client Client name (required)
* @param project Project name (required)
* @param artifact Template name (required)
* @param v Template version (optional)
* @return ApiResponse<String>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Retrieved content
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public ApiResponse getTemplateContentWithHttpInfo(String client, String project, String artifact, String v) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(400, "Missing the required parameter 'client' when calling getTemplateContent");
}
// verify the required parameter 'project' is set
if (project == null) {
throw new ApiException(400, "Missing the required parameter 'project' when calling getTemplateContent");
}
// verify the required parameter 'artifact' is set
if (artifact == null) {
throw new ApiException(400, "Missing the required parameter 'artifact' when calling getTemplateContent");
}
// create path and map variables
String localVarPath = "/templates/{client}/{project}/{artifact}/content"
.replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString()))
.replaceAll("\\{" + "project" + "\\}", apiClient.escapeString(project.toString()))
.replaceAll("\\{" + "artifact" + "\\}", apiClient.escapeString(artifact.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "v", v));
final String[] localVarAccepts = {
"text/plain"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api", "jwt", "oauth2" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("TemplateServicesApi.getTemplateContent", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* List templates
* Get templates using optional simple filters
* @param client Client name (required)
* @param project Project name (required)
* @param view Fields to return in the results (optional, default to new ArrayList<>())
* @return List<Template>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Retrieved templates
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public List listTemplates(String client, String project, List view) throws ApiException {
return listTemplatesWithHttpInfo(client, project, view).getData();
}
/**
* List templates
* Get templates using optional simple filters
* @param client Client name (required)
* @param project Project name (required)
* @param view Fields to return in the results (optional, default to new ArrayList<>())
* @return ApiResponse<List<Template>>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Retrieved templates
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public ApiResponse> listTemplatesWithHttpInfo(String client, String project, List view) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(400, "Missing the required parameter 'client' when calling listTemplates");
}
// verify the required parameter 'project' is set
if (project == null) {
throw new ApiException(400, "Missing the required parameter 'project' when calling listTemplates");
}
// create path and map variables
String localVarPath = "/templates/{client}/{project}"
.replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString()))
.replaceAll("\\{" + "project" + "\\}", apiClient.escapeString(project.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "view", view));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api", "jwt", "oauth2" };
GenericType> localVarReturnType = new GenericType>() {};
return apiClient.invokeAPI("TemplateServicesApi.listTemplates", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Save template
* Saves or creates a template (overwrite)
* @param client Client name (required)
* @param project Project name (required)
* @param template Template to persist (required)
* @return Template
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
The saved template
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
409
Version Conflict
-
500
Backend Error
-
*/
public Template saveTemplate(String client, String project, Template template) throws ApiException {
return saveTemplateWithHttpInfo(client, project, template).getData();
}
/**
* Save template
* Saves or creates a template (overwrite)
* @param client Client name (required)
* @param project Project name (required)
* @param template Template to persist (required)
* @return ApiResponse<Template>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
The saved template
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
409
Version Conflict
-
500
Backend Error
-
*/
public ApiResponse saveTemplateWithHttpInfo(String client, String project, Template template) throws ApiException {
Object localVarPostBody = template;
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(400, "Missing the required parameter 'client' when calling saveTemplate");
}
// verify the required parameter 'project' is set
if (project == null) {
throw new ApiException(400, "Missing the required parameter 'project' when calling saveTemplate");
}
// verify the required parameter 'template' is set
if (template == null) {
throw new ApiException(400, "Missing the required parameter 'template' when calling saveTemplate");
}
// create path and map variables
String localVarPath = "/templates/{client}/{project}"
.replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString()))
.replaceAll("\\{" + "project" + "\\}", apiClient.escapeString(project.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api", "jwt", "oauth2" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("TemplateServicesApi.saveTemplate", localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Update template
* Updates one template
* @param client Client name (required)
* @param project Project name (required)
* @param updateArtifactRequest Templates to update (required)
* @return ArtifactResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Results of the operation
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public ArtifactResponse updateTemplate(String client, String project, UpdateArtifactRequest updateArtifactRequest) throws ApiException {
return updateTemplateWithHttpInfo(client, project, updateArtifactRequest).getData();
}
/**
* Update template
* Updates one template
* @param client Client name (required)
* @param project Project name (required)
* @param updateArtifactRequest Templates to update (required)
* @return ApiResponse<ArtifactResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Results of the operation
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public ApiResponse updateTemplateWithHttpInfo(String client, String project, UpdateArtifactRequest updateArtifactRequest) throws ApiException {
Object localVarPostBody = updateArtifactRequest;
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(400, "Missing the required parameter 'client' when calling updateTemplate");
}
// verify the required parameter 'project' is set
if (project == null) {
throw new ApiException(400, "Missing the required parameter 'project' when calling updateTemplate");
}
// verify the required parameter 'updateArtifactRequest' is set
if (updateArtifactRequest == null) {
throw new ApiException(400, "Missing the required parameter 'updateArtifactRequest' when calling updateTemplate");
}
// create path and map variables
String localVarPath = "/templates/{client}/{project}"
.replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString()))
.replaceAll("\\{" + "project" + "\\}", apiClient.escapeString(project.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api", "jwt", "oauth2" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("TemplateServicesApi.updateTemplate", localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Update content using file
* Update the template with using a file
* @param client Client name (required)
* @param project Project name (required)
* @param artifact Template name (required)
* @param v Template version (optional)
* @param file File (optional)
* @return UpdateTemplateResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
The uploaded custom files
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public UpdateTemplateResponse updateTemplateContentFile(String client, String project, String artifact, String v, File file) throws ApiException {
return updateTemplateContentFileWithHttpInfo(client, project, artifact, v, file).getData();
}
/**
* Update content using file
* Update the template with using a file
* @param client Client name (required)
* @param project Project name (required)
* @param artifact Template name (required)
* @param v Template version (optional)
* @param file File (optional)
* @return ApiResponse<UpdateTemplateResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
The uploaded custom files
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public ApiResponse updateTemplateContentFileWithHttpInfo(String client, String project, String artifact, String v, File file) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(400, "Missing the required parameter 'client' when calling updateTemplateContentFile");
}
// verify the required parameter 'project' is set
if (project == null) {
throw new ApiException(400, "Missing the required parameter 'project' when calling updateTemplateContentFile");
}
// verify the required parameter 'artifact' is set
if (artifact == null) {
throw new ApiException(400, "Missing the required parameter 'artifact' when calling updateTemplateContentFile");
}
// create path and map variables
String localVarPath = "/templates/{client}/{project}/{artifact}/content"
.replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString()))
.replaceAll("\\{" + "project" + "\\}", apiClient.escapeString(project.toString()))
.replaceAll("\\{" + "artifact" + "\\}", apiClient.escapeString(artifact.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "v", v));
if (file != null)
localVarFormParams.put("file", file);
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"multipart/form-data"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api", "jwt", "oauth2" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("TemplateServicesApi.updateTemplateContentFile", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Update content using string
* Update the template using a string
* @param client Client name (required)
* @param project Project name (required)
* @param artifact Template name (required)
* @param v Template version (optional)
* @param body (optional)
* @return UpdateTemplateResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
The update results
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public UpdateTemplateResponse updateTemplateContentText(String client, String project, String artifact, String v, String body) throws ApiException {
return updateTemplateContentTextWithHttpInfo(client, project, artifact, v, body).getData();
}
/**
* Update content using string
* Update the template using a string
* @param client Client name (required)
* @param project Project name (required)
* @param artifact Template name (required)
* @param v Template version (optional)
* @param body (optional)
* @return ApiResponse<UpdateTemplateResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
The update results
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public ApiResponse updateTemplateContentTextWithHttpInfo(String client, String project, String artifact, String v, String body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(400, "Missing the required parameter 'client' when calling updateTemplateContentText");
}
// verify the required parameter 'project' is set
if (project == null) {
throw new ApiException(400, "Missing the required parameter 'project' when calling updateTemplateContentText");
}
// verify the required parameter 'artifact' is set
if (artifact == null) {
throw new ApiException(400, "Missing the required parameter 'artifact' when calling updateTemplateContentText");
}
// create path and map variables
String localVarPath = "/templates/{client}/{project}/{artifact}/content"
.replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString()))
.replaceAll("\\{" + "project" + "\\}", apiClient.escapeString(project.toString()))
.replaceAll("\\{" + "artifact" + "\\}", apiClient.escapeString(artifact.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "v", v));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"text/plain"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api", "jwt", "oauth2" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("TemplateServicesApi.updateTemplateContentText", localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Update templates
* Updates multiple templates
* @param client Client name (required)
* @param project Project name (required)
* @param updateArtifactRequest Templates to update (required)
* @return ArtifactResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Results of the operation
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public ArtifactResponse updateTemplates(String client, String project, UpdateArtifactRequest updateArtifactRequest) throws ApiException {
return updateTemplatesWithHttpInfo(client, project, updateArtifactRequest).getData();
}
/**
* Update templates
* Updates multiple templates
* @param client Client name (required)
* @param project Project name (required)
* @param updateArtifactRequest Templates to update (required)
* @return ApiResponse<ArtifactResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Results of the operation
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public ApiResponse updateTemplatesWithHttpInfo(String client, String project, UpdateArtifactRequest updateArtifactRequest) throws ApiException {
Object localVarPostBody = updateArtifactRequest;
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(400, "Missing the required parameter 'client' when calling updateTemplates");
}
// verify the required parameter 'project' is set
if (project == null) {
throw new ApiException(400, "Missing the required parameter 'project' when calling updateTemplates");
}
// verify the required parameter 'updateArtifactRequest' is set
if (updateArtifactRequest == null) {
throw new ApiException(400, "Missing the required parameter 'updateArtifactRequest' when calling updateTemplates");
}
// create path and map variables
String localVarPath = "/templates/{client}/{project}"
.replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString()))
.replaceAll("\\{" + "project" + "\\}", apiClient.escapeString(project.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api", "jwt", "oauth2" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("TemplateServicesApi.updateTemplates", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}