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 com.blazebit.query.connector.kandji.api;
import com.blazebit.query.connector.kandji.invoker.ApiException;
import com.blazebit.query.connector.kandji.invoker.ApiClient;
import com.blazebit.query.connector.kandji.invoker.ApiResponse;
import com.blazebit.query.connector.kandji.invoker.Configuration;
import com.blazebit.query.connector.kandji.invoker.Pair;
import jakarta.ws.rs.core.GenericType;
import com.blazebit.query.connector.kandji.model.CreateCustomProfile201Response;
import java.io.File;
import com.blazebit.query.connector.kandji.model.GetCustomProfile200Response;
import com.blazebit.query.connector.kandji.model.ListCustomProfiles200Response;
import com.blazebit.query.connector.kandji.model.UpdateCustomProfile200Response;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-04-30T07:19:31.168100307Z[Etc/UTC]", comments = "Generator version: 7.10.0")
public class CustomProfilesApi {
private ApiClient apiClient;
public CustomProfilesApi() {
this(Configuration.getDefaultApiClient());
}
public CustomProfilesApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Get the API client
*
* @return API client
*/
public ApiClient getApiClient() {
return apiClient;
}
/**
* Set the API client
*
* @param apiClient an instance of API client
*/
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Create Custom Profile
* This request allows you to create a custom profile in the Kandji library.
* @param active (Optional, default=true) Whether this library item is active (optional)
* @param _file (Required) The profile's .mobileconfig file (optional)
* @param name (Required) The profile name (optional)
* @return CreateCustomProfile201Response
* @throws ApiException if fails to make API call
* @http.response.details
*/
public CreateCustomProfile201Response createCustomProfile(String active, File _file, String name) throws ApiException {
return createCustomProfileWithHttpInfo(active, _file, name).getData();
}
/**
* Create Custom Profile
* This request allows you to create a custom profile in the Kandji library.
* @param active (Optional, default=true) Whether this library item is active (optional)
* @param _file (Required) The profile's .mobileconfig file (optional)
* @param name (Required) The profile name (optional)
* @return ApiResponse<CreateCustomProfile201Response>
* @throws ApiException if fails to make API call
* @http.response.details
*/
public ApiResponse createCustomProfileWithHttpInfo(String active, File _file, String name) throws ApiException {
// Form parameters
Map localVarFormParams = new LinkedHashMap<>();
if (active != null) {
localVarFormParams.put("active", active);
}
if (_file != null) {
localVarFormParams.put("file", _file);
}
if (name != null) {
localVarFormParams.put("name", name);
}
String localVarAccept = apiClient.selectHeaderAccept("application/json");
String localVarContentType = apiClient.selectHeaderContentType("multipart/form-data");
String[] localVarAuthNames = new String[] {"bearerAuth"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("CustomProfilesApi.createCustomProfile", "/api/v1/library/custom-profiles", "POST", new ArrayList<>(), null,
new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, false);
}
/**
* Delete Custom Profile
* NOTICE: This is permanent so be careful. This endpoint sends a request to delete a specific custom profile from the Kandji library. ### Request Parameters `library_item_id` (path parameter): The unique identifier of the library item.
* @param libraryItemId (required)
* @throws ApiException if fails to make API call
* @http.response.details
*/
public void deleteCustomProfile(String libraryItemId) throws ApiException {
deleteCustomProfileWithHttpInfo(libraryItemId);
}
/**
* Delete Custom Profile
* NOTICE: This is permanent so be careful. This endpoint sends a request to delete a specific custom profile from the Kandji library. ### Request Parameters `library_item_id` (path parameter): The unique identifier of the library item.
* @param libraryItemId (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
*/
public GetCustomProfile200Response getCustomProfile(String libraryItemId) throws ApiException {
return getCustomProfileWithHttpInfo(libraryItemId).getData();
}
/**
* Get Custom Profile
* This endpoint retrieves details about a specific custom app from the Kandji library. ### Request Parameters `library_item_id` (path parameter): The unique identifier of the library item.
* @param libraryItemId (required)
* @return ApiResponse<GetCustomProfile200Response>
* @throws ApiException if fails to make API call
* @http.response.details
*/
public ApiResponse getCustomProfileWithHttpInfo(String libraryItemId) throws ApiException {
// Check required parameters
if (libraryItemId == null) {
throw new ApiException(400, "Missing the required parameter 'libraryItemId' when calling getCustomProfile");
}
// Path parameters
String localVarPath = "/api/v1/library/custom-profiles/{library_item_id}"
.replaceAll("\\{library_item_id}", apiClient.escapeString(libraryItemId.toString()));
String localVarAccept = apiClient.selectHeaderAccept("application/json");
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("CustomProfilesApi.getCustomProfile", localVarPath, "GET", new ArrayList<>(), null,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, false);
}
/**
* List Custom Profiles
* This endpoint makes a request to retrieve a list of custom profiles from the Kandji library.
* @param page Optional page number (when results exceed pagination threshold) (optional)
* @return ListCustomProfiles200Response
* @throws ApiException if fails to make API call
* @http.response.details
*/
public ListCustomProfiles200Response listCustomProfiles(String page) throws ApiException {
return listCustomProfilesWithHttpInfo(page).getData();
}
/**
* List Custom Profiles
* This endpoint makes a request to retrieve a list of custom profiles from the Kandji library.
* @param page Optional page number (when results exceed pagination threshold) (optional)
* @return ApiResponse<ListCustomProfiles200Response>
* @throws ApiException if fails to make API call
* @http.response.details
*/
public UpdateCustomProfile200Response updateCustomProfile(String libraryItemId, String name) throws ApiException {
return updateCustomProfileWithHttpInfo(libraryItemId, name).getData();
}
/**
* Update Custom Profile
* This request allows you to update a custom profile in the Kandji library. ### Request Parameters `library_item_id` (path parameter): The unique identifier of the library item.
* @param libraryItemId (required)
* @param name Renaming a custom profile (optional)
* @return ApiResponse<UpdateCustomProfile200Response>
* @throws ApiException if fails to make API call
* @http.response.details