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.
/*
* Carbon
* Connect external data to LLMs, no matter the source.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by Konfig (https://konfigthis.com).
* Do not edit the class manually.
*/
package com.konfigthis.carbonai.client.api;
import com.konfigthis.carbonai.client.ApiCallback;
import com.konfigthis.carbonai.client.ApiClient;
import com.konfigthis.carbonai.client.ApiException;
import com.konfigthis.carbonai.client.ApiResponse;
import com.konfigthis.carbonai.client.Configuration;
import com.konfigthis.carbonai.client.Pair;
import com.konfigthis.carbonai.client.ProgressRequestBody;
import com.konfigthis.carbonai.client.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.konfigthis.carbonai.client.model.ConnectDataSourceInput;
import com.konfigthis.carbonai.client.model.ConnectDataSourceResponse;
import com.konfigthis.carbonai.client.model.EmbeddingGenerators;
import com.konfigthis.carbonai.client.model.EmbeddingGeneratorsNullable;
import com.konfigthis.carbonai.client.model.ExternalSourceItemsOrderBy;
import com.konfigthis.carbonai.client.model.FileSyncConfigNullable;
import com.konfigthis.carbonai.client.model.FreshDeskConnectRequest;
import com.konfigthis.carbonai.client.model.GenericSuccessResponse;
import com.konfigthis.carbonai.client.model.GitbookConnectRequest;
import com.konfigthis.carbonai.client.model.GitbookSyncRequest;
import com.konfigthis.carbonai.client.model.GithubConnectRequest;
import com.konfigthis.carbonai.client.model.GithubFetchReposRequest;
import com.konfigthis.carbonai.client.model.GmailSyncInput;
import com.konfigthis.carbonai.client.model.GuruConnectRequest;
import com.konfigthis.carbonai.client.model.ListDataSourceItemsRequest;
import com.konfigthis.carbonai.client.model.ListDataSourceItemsResponse;
import com.konfigthis.carbonai.client.model.ListItemsFiltersNullable;
import com.konfigthis.carbonai.client.model.ListRequest;
import com.konfigthis.carbonai.client.model.ListResponse;
import com.konfigthis.carbonai.client.model.OANSCZGF;
import com.konfigthis.carbonai.client.model.OAuthURLRequest;
import com.konfigthis.carbonai.client.model.OauthBasedConnectors;
import com.konfigthis.carbonai.client.model.OrderDirV2;
import com.konfigthis.carbonai.client.model.OrganizationUserDataSourceAPI;
import com.konfigthis.carbonai.client.model.OuthURLResponse;
import com.konfigthis.carbonai.client.model.OutlookSyncInput;
import com.konfigthis.carbonai.client.model.Pagination;
import com.konfigthis.carbonai.client.model.RSSFeedInput;
import com.konfigthis.carbonai.client.model.S3AuthRequest;
import com.konfigthis.carbonai.client.model.S3FileSyncInput;
import com.konfigthis.carbonai.client.model.S3GetFileInput;
import com.konfigthis.carbonai.client.model.ServiceNowCredentialsNullable;
import com.konfigthis.carbonai.client.model.SlackFilters;
import com.konfigthis.carbonai.client.model.SlackSyncRequest;
import com.konfigthis.carbonai.client.model.SyncDirectoryRequest;
import com.konfigthis.carbonai.client.model.SyncFilesRequest;
import com.konfigthis.carbonai.client.model.SyncOptions;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class IntegrationsApiGenerated {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public IntegrationsApiGenerated() throws IllegalArgumentException {
this(Configuration.getDefaultApiClient());
}
public IntegrationsApiGenerated(ApiClient apiClient) throws IllegalArgumentException {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public int getHostIndex() {
return localHostIndex;
}
public void setHostIndex(int hostIndex) {
this.localHostIndex = hostIndex;
}
public String getCustomBaseUrl() {
return localCustomBaseUrl;
}
public void setCustomBaseUrl(String customBaseUrl) {
this.localCustomBaseUrl = customBaseUrl;
}
private okhttp3.Call cancelCall(SyncDirectoryRequest syncDirectoryRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = syncDirectoryRequest;
// create path and map variables
String localVarPath = "/integrations/items/sync/cancel";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "accessToken", "apiKey", "customerId" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call cancelValidateBeforeCall(SyncDirectoryRequest syncDirectoryRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'syncDirectoryRequest' is set
if (syncDirectoryRequest == null) {
throw new ApiException("Missing the required parameter 'syncDirectoryRequest' when calling cancel(Async)");
}
return cancelCall(syncDirectoryRequest, _callback);
}
private ApiResponse cancelWithHttpInfo(SyncDirectoryRequest syncDirectoryRequest) throws ApiException {
okhttp3.Call localVarCall = cancelValidateBeforeCall(syncDirectoryRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call cancelAsync(SyncDirectoryRequest syncDirectoryRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = cancelValidateBeforeCall(syncDirectoryRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class CancelRequestBuilderGenerated {
final Integer dataSourceId;
public CancelRequestBuilderGenerated(Integer dataSourceId) {
this.dataSourceId = dataSourceId;
}
/**
* Build call for cancel
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
SyncDirectoryRequest syncDirectoryRequest = buildBodyParams();
return cancelCall(syncDirectoryRequest, _callback);
}
private SyncDirectoryRequest buildBodyParams() {
SyncDirectoryRequest syncDirectoryRequest = new SyncDirectoryRequest();
syncDirectoryRequest.dataSourceId(this.dataSourceId);
return syncDirectoryRequest;
}
/**
* Execute cancel request
* @return OrganizationUserDataSourceAPI
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public OrganizationUserDataSourceAPI execute() throws ApiException {
SyncDirectoryRequest syncDirectoryRequest = buildBodyParams();
ApiResponse localVarResp = cancelWithHttpInfo(syncDirectoryRequest);
return localVarResp.getResponseBody();
}
/**
* Execute cancel request with HTTP info returned
* @return ApiResponse<OrganizationUserDataSourceAPI>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
SyncDirectoryRequest syncDirectoryRequest = buildBodyParams();
return cancelWithHttpInfo(syncDirectoryRequest);
}
/**
* Execute cancel request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
*/
public IntegrationsApi.CancelRequestBuilder cancel(Integer dataSourceId) throws IllegalArgumentException {
if (dataSourceId == null) throw new IllegalArgumentException("\"dataSourceId\" is required but got null");
return ((IntegrationsApi) this).new CancelRequestBuilder(dataSourceId);
}
private okhttp3.Call connectDataSourceCall(ConnectDataSourceInput connectDataSourceInput, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = connectDataSourceInput;
// create path and map variables
String localVarPath = "/integrations/connect";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "accessToken", "apiKey", "customerId" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call connectDataSourceValidateBeforeCall(ConnectDataSourceInput connectDataSourceInput, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'connectDataSourceInput' is set
if (connectDataSourceInput == null) {
throw new ApiException("Missing the required parameter 'connectDataSourceInput' when calling connectDataSource(Async)");
}
return connectDataSourceCall(connectDataSourceInput, _callback);
}
private ApiResponse connectDataSourceWithHttpInfo(ConnectDataSourceInput connectDataSourceInput) throws ApiException {
okhttp3.Call localVarCall = connectDataSourceValidateBeforeCall(connectDataSourceInput, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call connectDataSourceAsync(ConnectDataSourceInput connectDataSourceInput, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = connectDataSourceValidateBeforeCall(connectDataSourceInput, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class ConnectDataSourceRequestBuilderGenerated {
final OANSCZGF authentication;
SyncOptions syncOptions;
public ConnectDataSourceRequestBuilderGenerated(OANSCZGF authentication) {
this.authentication = authentication;
}
/**
* Set syncOptions
* @param syncOptions (optional)
* @return IntegrationsApi.ConnectDataSourceRequestBuilder
*/
public IntegrationsApi.ConnectDataSourceRequestBuilder syncOptions(SyncOptions syncOptions) {
this.syncOptions = syncOptions;
return (IntegrationsApi.ConnectDataSourceRequestBuilder) this;
}
/**
* Build call for connectDataSource
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
ConnectDataSourceInput connectDataSourceInput = buildBodyParams();
return connectDataSourceCall(connectDataSourceInput, _callback);
}
private ConnectDataSourceInput buildBodyParams() {
ConnectDataSourceInput connectDataSourceInput = new ConnectDataSourceInput();
connectDataSourceInput.authentication(this.authentication);
connectDataSourceInput.syncOptions(this.syncOptions);
return connectDataSourceInput;
}
/**
* Execute connectDataSource request
* @return ConnectDataSourceResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public ConnectDataSourceResponse execute() throws ApiException {
ConnectDataSourceInput connectDataSourceInput = buildBodyParams();
ApiResponse localVarResp = connectDataSourceWithHttpInfo(connectDataSourceInput);
return localVarResp.getResponseBody();
}
/**
* Execute connectDataSource request with HTTP info returned
* @return ApiResponse<ConnectDataSourceResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
ConnectDataSourceInput connectDataSourceInput = buildBodyParams();
return connectDataSourceWithHttpInfo(connectDataSourceInput);
}
/**
* Execute connectDataSource request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
*/
public IntegrationsApi.ConnectDataSourceRequestBuilder connectDataSource(OANSCZGF authentication) throws IllegalArgumentException {
if (authentication == null) throw new IllegalArgumentException("\"authentication\" is required but got null");
return ((IntegrationsApi) this).new ConnectDataSourceRequestBuilder(authentication);
}
private okhttp3.Call connectFreshdeskCall(FreshDeskConnectRequest freshDeskConnectRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = freshDeskConnectRequest;
// create path and map variables
String localVarPath = "/integrations/freshdesk";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "accessToken", "apiKey", "customerId" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call connectFreshdeskValidateBeforeCall(FreshDeskConnectRequest freshDeskConnectRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'freshDeskConnectRequest' is set
if (freshDeskConnectRequest == null) {
throw new ApiException("Missing the required parameter 'freshDeskConnectRequest' when calling connectFreshdesk(Async)");
}
return connectFreshdeskCall(freshDeskConnectRequest, _callback);
}
private ApiResponse connectFreshdeskWithHttpInfo(FreshDeskConnectRequest freshDeskConnectRequest) throws ApiException {
okhttp3.Call localVarCall = connectFreshdeskValidateBeforeCall(freshDeskConnectRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call connectFreshdeskAsync(FreshDeskConnectRequest freshDeskConnectRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = connectFreshdeskValidateBeforeCall(freshDeskConnectRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class ConnectFreshdeskRequestBuilderGenerated {
final String domain;
final String apiKey;
Object tags;
Integer chunkSize;
Integer chunkOverlap;
Boolean skipEmbeddingGeneration;
EmbeddingGeneratorsNullable embeddingModel;
Boolean generateSparseVectors;
Boolean prependFilenameToChunks;
Boolean syncFilesOnConnection;
String requestId;
Boolean syncSourceItems;
FileSyncConfigNullable fileSyncConfig;
public ConnectFreshdeskRequestBuilderGenerated(String domain, String apiKey) {
this.domain = domain;
this.apiKey = apiKey;
}
/**
* Set tags
* @param tags (optional)
* @return IntegrationsApi.ConnectFreshdeskRequestBuilder
*/
public IntegrationsApi.ConnectFreshdeskRequestBuilder tags(Object tags) {
this.tags = tags;
return (IntegrationsApi.ConnectFreshdeskRequestBuilder) this;
}
/**
* Set chunkSize
* @param chunkSize (optional, default to 1500)
* @return IntegrationsApi.ConnectFreshdeskRequestBuilder
*/
public IntegrationsApi.ConnectFreshdeskRequestBuilder chunkSize(Integer chunkSize) {
this.chunkSize = chunkSize;
return (IntegrationsApi.ConnectFreshdeskRequestBuilder) this;
}
/**
* Set chunkOverlap
* @param chunkOverlap (optional, default to 20)
* @return IntegrationsApi.ConnectFreshdeskRequestBuilder
*/
public IntegrationsApi.ConnectFreshdeskRequestBuilder chunkOverlap(Integer chunkOverlap) {
this.chunkOverlap = chunkOverlap;
return (IntegrationsApi.ConnectFreshdeskRequestBuilder) this;
}
/**
* Set skipEmbeddingGeneration
* @param skipEmbeddingGeneration (optional, default to false)
* @return IntegrationsApi.ConnectFreshdeskRequestBuilder
*/
public IntegrationsApi.ConnectFreshdeskRequestBuilder skipEmbeddingGeneration(Boolean skipEmbeddingGeneration) {
this.skipEmbeddingGeneration = skipEmbeddingGeneration;
return (IntegrationsApi.ConnectFreshdeskRequestBuilder) this;
}
/**
* Set embeddingModel
* @param embeddingModel (optional, default to OPENAI)
* @return IntegrationsApi.ConnectFreshdeskRequestBuilder
*/
public IntegrationsApi.ConnectFreshdeskRequestBuilder embeddingModel(EmbeddingGeneratorsNullable embeddingModel) {
this.embeddingModel = embeddingModel;
return (IntegrationsApi.ConnectFreshdeskRequestBuilder) this;
}
/**
* Set generateSparseVectors
* @param generateSparseVectors (optional, default to false)
* @return IntegrationsApi.ConnectFreshdeskRequestBuilder
*/
public IntegrationsApi.ConnectFreshdeskRequestBuilder generateSparseVectors(Boolean generateSparseVectors) {
this.generateSparseVectors = generateSparseVectors;
return (IntegrationsApi.ConnectFreshdeskRequestBuilder) this;
}
/**
* Set prependFilenameToChunks
* @param prependFilenameToChunks (optional, default to false)
* @return IntegrationsApi.ConnectFreshdeskRequestBuilder
*/
public IntegrationsApi.ConnectFreshdeskRequestBuilder prependFilenameToChunks(Boolean prependFilenameToChunks) {
this.prependFilenameToChunks = prependFilenameToChunks;
return (IntegrationsApi.ConnectFreshdeskRequestBuilder) this;
}
/**
* Set syncFilesOnConnection
* @param syncFilesOnConnection (optional, default to true)
* @return IntegrationsApi.ConnectFreshdeskRequestBuilder
*/
public IntegrationsApi.ConnectFreshdeskRequestBuilder syncFilesOnConnection(Boolean syncFilesOnConnection) {
this.syncFilesOnConnection = syncFilesOnConnection;
return (IntegrationsApi.ConnectFreshdeskRequestBuilder) this;
}
/**
* Set requestId
* @param requestId (optional)
* @return IntegrationsApi.ConnectFreshdeskRequestBuilder
*/
public IntegrationsApi.ConnectFreshdeskRequestBuilder requestId(String requestId) {
this.requestId = requestId;
return (IntegrationsApi.ConnectFreshdeskRequestBuilder) this;
}
/**
* Set syncSourceItems
* @param syncSourceItems Enabling this flag will fetch all available content from the source to be listed via list items endpoint (optional, default to true)
* @return IntegrationsApi.ConnectFreshdeskRequestBuilder
*/
public IntegrationsApi.ConnectFreshdeskRequestBuilder syncSourceItems(Boolean syncSourceItems) {
this.syncSourceItems = syncSourceItems;
return (IntegrationsApi.ConnectFreshdeskRequestBuilder) this;
}
/**
* Set fileSyncConfig
* @param fileSyncConfig (optional)
* @return IntegrationsApi.ConnectFreshdeskRequestBuilder
*/
public IntegrationsApi.ConnectFreshdeskRequestBuilder fileSyncConfig(FileSyncConfigNullable fileSyncConfig) {
this.fileSyncConfig = fileSyncConfig;
return (IntegrationsApi.ConnectFreshdeskRequestBuilder) this;
}
/**
* Build call for connectFreshdesk
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
FreshDeskConnectRequest freshDeskConnectRequest = buildBodyParams();
return connectFreshdeskCall(freshDeskConnectRequest, _callback);
}
private FreshDeskConnectRequest buildBodyParams() {
FreshDeskConnectRequest freshDeskConnectRequest = new FreshDeskConnectRequest();
freshDeskConnectRequest.tags(this.tags);
freshDeskConnectRequest.domain(this.domain);
freshDeskConnectRequest.apiKey(this.apiKey);
freshDeskConnectRequest.chunkSize(this.chunkSize);
freshDeskConnectRequest.chunkOverlap(this.chunkOverlap);
freshDeskConnectRequest.skipEmbeddingGeneration(this.skipEmbeddingGeneration);
freshDeskConnectRequest.embeddingModel(this.embeddingModel);
freshDeskConnectRequest.generateSparseVectors(this.generateSparseVectors);
freshDeskConnectRequest.prependFilenameToChunks(this.prependFilenameToChunks);
freshDeskConnectRequest.syncFilesOnConnection(this.syncFilesOnConnection);
freshDeskConnectRequest.requestId(this.requestId);
freshDeskConnectRequest.syncSourceItems(this.syncSourceItems);
freshDeskConnectRequest.fileSyncConfig(this.fileSyncConfig);
return freshDeskConnectRequest;
}
/**
* Execute connectFreshdesk request
* @return GenericSuccessResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public GenericSuccessResponse execute() throws ApiException {
FreshDeskConnectRequest freshDeskConnectRequest = buildBodyParams();
ApiResponse localVarResp = connectFreshdeskWithHttpInfo(freshDeskConnectRequest);
return localVarResp.getResponseBody();
}
/**
* Execute connectFreshdesk request with HTTP info returned
* @return ApiResponse<GenericSuccessResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
FreshDeskConnectRequest freshDeskConnectRequest = buildBodyParams();
return connectFreshdeskWithHttpInfo(freshDeskConnectRequest);
}
/**
* Execute connectFreshdesk request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
FreshDeskConnectRequest freshDeskConnectRequest = buildBodyParams();
return connectFreshdeskAsync(freshDeskConnectRequest, _callback);
}
}
/**
* Freshdesk Connect
* Refer this article to obtain an API key https://support.freshdesk.com/en/support/solutions/articles/215517. Make sure that your API key has the permission to read solutions from your account and you are on a <b>paid</b> plan. Once you have an API key, you can make a request to this endpoint along with your freshdesk domain. This will trigger an automatic sync of the articles in your \"solutions\" tab. Additional parameters below can be used to associate data with the synced articles or modify the sync behavior.
* @param freshDeskConnectRequest (required)
* @return ConnectFreshdeskRequestBuilder
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public IntegrationsApi.ConnectFreshdeskRequestBuilder connectFreshdesk(String domain, String apiKey) throws IllegalArgumentException {
if (domain == null) throw new IllegalArgumentException("\"domain\" is required but got null");
if (apiKey == null) throw new IllegalArgumentException("\"apiKey\" is required but got null");
return ((IntegrationsApi) this).new ConnectFreshdeskRequestBuilder(domain, apiKey);
}
private okhttp3.Call connectGitbookCall(GitbookConnectRequest gitbookConnectRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = gitbookConnectRequest;
// create path and map variables
String localVarPath = "/integrations/gitbook";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "accessToken", "apiKey", "customerId" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call connectGitbookValidateBeforeCall(GitbookConnectRequest gitbookConnectRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'gitbookConnectRequest' is set
if (gitbookConnectRequest == null) {
throw new ApiException("Missing the required parameter 'gitbookConnectRequest' when calling connectGitbook(Async)");
}
return connectGitbookCall(gitbookConnectRequest, _callback);
}
private ApiResponse connectGitbookWithHttpInfo(GitbookConnectRequest gitbookConnectRequest) throws ApiException {
okhttp3.Call localVarCall = connectGitbookValidateBeforeCall(gitbookConnectRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call connectGitbookAsync(GitbookConnectRequest gitbookConnectRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = connectGitbookValidateBeforeCall(gitbookConnectRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class ConnectGitbookRequestBuilderGenerated {
final String organization;
final String accessToken;
Object tags;
Integer chunkSize;
Integer chunkOverlap;
Boolean skipEmbeddingGeneration;
EmbeddingGenerators embeddingModel;
Boolean generateSparseVectors;
Boolean prependFilenameToChunks;
Boolean syncFilesOnConnection;
String requestId;
Boolean syncSourceItems;
FileSyncConfigNullable fileSyncConfig;
public ConnectGitbookRequestBuilderGenerated(String organization, String accessToken) {
this.organization = organization;
this.accessToken = accessToken;
}
/**
* Set tags
* @param tags (optional)
* @return IntegrationsApi.ConnectGitbookRequestBuilder
*/
public IntegrationsApi.ConnectGitbookRequestBuilder tags(Object tags) {
this.tags = tags;
return (IntegrationsApi.ConnectGitbookRequestBuilder) this;
}
/**
* Set chunkSize
* @param chunkSize (optional, default to 1500)
* @return IntegrationsApi.ConnectGitbookRequestBuilder
*/
public IntegrationsApi.ConnectGitbookRequestBuilder chunkSize(Integer chunkSize) {
this.chunkSize = chunkSize;
return (IntegrationsApi.ConnectGitbookRequestBuilder) this;
}
/**
* Set chunkOverlap
* @param chunkOverlap (optional, default to 20)
* @return IntegrationsApi.ConnectGitbookRequestBuilder
*/
public IntegrationsApi.ConnectGitbookRequestBuilder chunkOverlap(Integer chunkOverlap) {
this.chunkOverlap = chunkOverlap;
return (IntegrationsApi.ConnectGitbookRequestBuilder) this;
}
/**
* Set skipEmbeddingGeneration
* @param skipEmbeddingGeneration (optional, default to false)
* @return IntegrationsApi.ConnectGitbookRequestBuilder
*/
public IntegrationsApi.ConnectGitbookRequestBuilder skipEmbeddingGeneration(Boolean skipEmbeddingGeneration) {
this.skipEmbeddingGeneration = skipEmbeddingGeneration;
return (IntegrationsApi.ConnectGitbookRequestBuilder) this;
}
/**
* Set embeddingModel
* @param embeddingModel (optional)
* @return IntegrationsApi.ConnectGitbookRequestBuilder
*/
public IntegrationsApi.ConnectGitbookRequestBuilder embeddingModel(EmbeddingGenerators embeddingModel) {
this.embeddingModel = embeddingModel;
return (IntegrationsApi.ConnectGitbookRequestBuilder) this;
}
/**
* Set generateSparseVectors
* @param generateSparseVectors (optional, default to false)
* @return IntegrationsApi.ConnectGitbookRequestBuilder
*/
public IntegrationsApi.ConnectGitbookRequestBuilder generateSparseVectors(Boolean generateSparseVectors) {
this.generateSparseVectors = generateSparseVectors;
return (IntegrationsApi.ConnectGitbookRequestBuilder) this;
}
/**
* Set prependFilenameToChunks
* @param prependFilenameToChunks (optional, default to false)
* @return IntegrationsApi.ConnectGitbookRequestBuilder
*/
public IntegrationsApi.ConnectGitbookRequestBuilder prependFilenameToChunks(Boolean prependFilenameToChunks) {
this.prependFilenameToChunks = prependFilenameToChunks;
return (IntegrationsApi.ConnectGitbookRequestBuilder) this;
}
/**
* Set syncFilesOnConnection
* @param syncFilesOnConnection (optional, default to true)
* @return IntegrationsApi.ConnectGitbookRequestBuilder
*/
public IntegrationsApi.ConnectGitbookRequestBuilder syncFilesOnConnection(Boolean syncFilesOnConnection) {
this.syncFilesOnConnection = syncFilesOnConnection;
return (IntegrationsApi.ConnectGitbookRequestBuilder) this;
}
/**
* Set requestId
* @param requestId (optional)
* @return IntegrationsApi.ConnectGitbookRequestBuilder
*/
public IntegrationsApi.ConnectGitbookRequestBuilder requestId(String requestId) {
this.requestId = requestId;
return (IntegrationsApi.ConnectGitbookRequestBuilder) this;
}
/**
* Set syncSourceItems
* @param syncSourceItems Enabling this flag will fetch all available content from the source to be listed via list items endpoint (optional, default to true)
* @return IntegrationsApi.ConnectGitbookRequestBuilder
*/
public IntegrationsApi.ConnectGitbookRequestBuilder syncSourceItems(Boolean syncSourceItems) {
this.syncSourceItems = syncSourceItems;
return (IntegrationsApi.ConnectGitbookRequestBuilder) this;
}
/**
* Set fileSyncConfig
* @param fileSyncConfig (optional)
* @return IntegrationsApi.ConnectGitbookRequestBuilder
*/
public IntegrationsApi.ConnectGitbookRequestBuilder fileSyncConfig(FileSyncConfigNullable fileSyncConfig) {
this.fileSyncConfig = fileSyncConfig;
return (IntegrationsApi.ConnectGitbookRequestBuilder) this;
}
/**
* Build call for connectGitbook
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
GitbookConnectRequest gitbookConnectRequest = buildBodyParams();
return connectGitbookCall(gitbookConnectRequest, _callback);
}
private GitbookConnectRequest buildBodyParams() {
GitbookConnectRequest gitbookConnectRequest = new GitbookConnectRequest();
gitbookConnectRequest.tags(this.tags);
gitbookConnectRequest.organization(this.organization);
gitbookConnectRequest.accessToken(this.accessToken);
gitbookConnectRequest.chunkSize(this.chunkSize);
gitbookConnectRequest.chunkOverlap(this.chunkOverlap);
gitbookConnectRequest.skipEmbeddingGeneration(this.skipEmbeddingGeneration);
gitbookConnectRequest.embeddingModel(this.embeddingModel);
gitbookConnectRequest.generateSparseVectors(this.generateSparseVectors);
gitbookConnectRequest.prependFilenameToChunks(this.prependFilenameToChunks);
gitbookConnectRequest.syncFilesOnConnection(this.syncFilesOnConnection);
gitbookConnectRequest.requestId(this.requestId);
gitbookConnectRequest.syncSourceItems(this.syncSourceItems);
gitbookConnectRequest.fileSyncConfig(this.fileSyncConfig);
return gitbookConnectRequest;
}
/**
* Execute connectGitbook request
* @return GenericSuccessResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public GenericSuccessResponse execute() throws ApiException {
GitbookConnectRequest gitbookConnectRequest = buildBodyParams();
ApiResponse localVarResp = connectGitbookWithHttpInfo(gitbookConnectRequest);
return localVarResp.getResponseBody();
}
/**
* Execute connectGitbook request with HTTP info returned
* @return ApiResponse<GenericSuccessResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
GitbookConnectRequest gitbookConnectRequest = buildBodyParams();
return connectGitbookWithHttpInfo(gitbookConnectRequest);
}
/**
* Execute connectGitbook request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
GitbookConnectRequest gitbookConnectRequest = buildBodyParams();
return connectGitbookAsync(gitbookConnectRequest, _callback);
}
}
/**
* Gitbook Connect
* You will need an access token to connect your Gitbook account. Note that the permissions will be defined by the user generating access token so make sure you have the permission to access spaces you will be syncing. Refer this article for more details https://developer.gitbook.com/gitbook-api/authentication. Additionally, you need to specify the name of organization you will be syncing data from.
* @param gitbookConnectRequest (required)
* @return ConnectGitbookRequestBuilder
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public IntegrationsApi.ConnectGitbookRequestBuilder connectGitbook(String organization, String accessToken) throws IllegalArgumentException {
if (organization == null) throw new IllegalArgumentException("\"organization\" is required but got null");
if (accessToken == null) throw new IllegalArgumentException("\"accessToken\" is required but got null");
return ((IntegrationsApi) this).new ConnectGitbookRequestBuilder(organization, accessToken);
}
private okhttp3.Call connectGuruCall(GuruConnectRequest guruConnectRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = guruConnectRequest;
// create path and map variables
String localVarPath = "/integrations/guru";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "accessToken", "apiKey", "customerId" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call connectGuruValidateBeforeCall(GuruConnectRequest guruConnectRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'guruConnectRequest' is set
if (guruConnectRequest == null) {
throw new ApiException("Missing the required parameter 'guruConnectRequest' when calling connectGuru(Async)");
}
return connectGuruCall(guruConnectRequest, _callback);
}
private ApiResponse connectGuruWithHttpInfo(GuruConnectRequest guruConnectRequest) throws ApiException {
okhttp3.Call localVarCall = connectGuruValidateBeforeCall(guruConnectRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call connectGuruAsync(GuruConnectRequest guruConnectRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = connectGuruValidateBeforeCall(guruConnectRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class ConnectGuruRequestBuilderGenerated {
final String username;
final String accessToken;
Object tags;
Integer chunkSize;
Integer chunkOverlap;
Boolean skipEmbeddingGeneration;
EmbeddingGenerators embeddingModel;
Boolean generateSparseVectors;
Boolean prependFilenameToChunks;
Boolean syncFilesOnConnection;
String requestId;
Boolean syncSourceItems;
FileSyncConfigNullable fileSyncConfig;
public ConnectGuruRequestBuilderGenerated(String username, String accessToken) {
this.username = username;
this.accessToken = accessToken;
}
/**
* Set tags
* @param tags (optional)
* @return IntegrationsApi.ConnectGuruRequestBuilder
*/
public IntegrationsApi.ConnectGuruRequestBuilder tags(Object tags) {
this.tags = tags;
return (IntegrationsApi.ConnectGuruRequestBuilder) this;
}
/**
* Set chunkSize
* @param chunkSize (optional, default to 1500)
* @return IntegrationsApi.ConnectGuruRequestBuilder
*/
public IntegrationsApi.ConnectGuruRequestBuilder chunkSize(Integer chunkSize) {
this.chunkSize = chunkSize;
return (IntegrationsApi.ConnectGuruRequestBuilder) this;
}
/**
* Set chunkOverlap
* @param chunkOverlap (optional, default to 20)
* @return IntegrationsApi.ConnectGuruRequestBuilder
*/
public IntegrationsApi.ConnectGuruRequestBuilder chunkOverlap(Integer chunkOverlap) {
this.chunkOverlap = chunkOverlap;
return (IntegrationsApi.ConnectGuruRequestBuilder) this;
}
/**
* Set skipEmbeddingGeneration
* @param skipEmbeddingGeneration (optional, default to false)
* @return IntegrationsApi.ConnectGuruRequestBuilder
*/
public IntegrationsApi.ConnectGuruRequestBuilder skipEmbeddingGeneration(Boolean skipEmbeddingGeneration) {
this.skipEmbeddingGeneration = skipEmbeddingGeneration;
return (IntegrationsApi.ConnectGuruRequestBuilder) this;
}
/**
* Set embeddingModel
* @param embeddingModel (optional)
* @return IntegrationsApi.ConnectGuruRequestBuilder
*/
public IntegrationsApi.ConnectGuruRequestBuilder embeddingModel(EmbeddingGenerators embeddingModel) {
this.embeddingModel = embeddingModel;
return (IntegrationsApi.ConnectGuruRequestBuilder) this;
}
/**
* Set generateSparseVectors
* @param generateSparseVectors (optional, default to false)
* @return IntegrationsApi.ConnectGuruRequestBuilder
*/
public IntegrationsApi.ConnectGuruRequestBuilder generateSparseVectors(Boolean generateSparseVectors) {
this.generateSparseVectors = generateSparseVectors;
return (IntegrationsApi.ConnectGuruRequestBuilder) this;
}
/**
* Set prependFilenameToChunks
* @param prependFilenameToChunks (optional, default to false)
* @return IntegrationsApi.ConnectGuruRequestBuilder
*/
public IntegrationsApi.ConnectGuruRequestBuilder prependFilenameToChunks(Boolean prependFilenameToChunks) {
this.prependFilenameToChunks = prependFilenameToChunks;
return (IntegrationsApi.ConnectGuruRequestBuilder) this;
}
/**
* Set syncFilesOnConnection
* @param syncFilesOnConnection (optional, default to true)
* @return IntegrationsApi.ConnectGuruRequestBuilder
*/
public IntegrationsApi.ConnectGuruRequestBuilder syncFilesOnConnection(Boolean syncFilesOnConnection) {
this.syncFilesOnConnection = syncFilesOnConnection;
return (IntegrationsApi.ConnectGuruRequestBuilder) this;
}
/**
* Set requestId
* @param requestId (optional)
* @return IntegrationsApi.ConnectGuruRequestBuilder
*/
public IntegrationsApi.ConnectGuruRequestBuilder requestId(String requestId) {
this.requestId = requestId;
return (IntegrationsApi.ConnectGuruRequestBuilder) this;
}
/**
* Set syncSourceItems
* @param syncSourceItems Enabling this flag will fetch all available content from the source to be listed via list items endpoint (optional, default to true)
* @return IntegrationsApi.ConnectGuruRequestBuilder
*/
public IntegrationsApi.ConnectGuruRequestBuilder syncSourceItems(Boolean syncSourceItems) {
this.syncSourceItems = syncSourceItems;
return (IntegrationsApi.ConnectGuruRequestBuilder) this;
}
/**
* Set fileSyncConfig
* @param fileSyncConfig (optional)
* @return IntegrationsApi.ConnectGuruRequestBuilder
*/
public IntegrationsApi.ConnectGuruRequestBuilder fileSyncConfig(FileSyncConfigNullable fileSyncConfig) {
this.fileSyncConfig = fileSyncConfig;
return (IntegrationsApi.ConnectGuruRequestBuilder) this;
}
/**
* Build call for connectGuru
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
GuruConnectRequest guruConnectRequest = buildBodyParams();
return connectGuruCall(guruConnectRequest, _callback);
}
private GuruConnectRequest buildBodyParams() {
GuruConnectRequest guruConnectRequest = new GuruConnectRequest();
guruConnectRequest.tags(this.tags);
guruConnectRequest.username(this.username);
guruConnectRequest.accessToken(this.accessToken);
guruConnectRequest.chunkSize(this.chunkSize);
guruConnectRequest.chunkOverlap(this.chunkOverlap);
guruConnectRequest.skipEmbeddingGeneration(this.skipEmbeddingGeneration);
guruConnectRequest.embeddingModel(this.embeddingModel);
guruConnectRequest.generateSparseVectors(this.generateSparseVectors);
guruConnectRequest.prependFilenameToChunks(this.prependFilenameToChunks);
guruConnectRequest.syncFilesOnConnection(this.syncFilesOnConnection);
guruConnectRequest.requestId(this.requestId);
guruConnectRequest.syncSourceItems(this.syncSourceItems);
guruConnectRequest.fileSyncConfig(this.fileSyncConfig);
return guruConnectRequest;
}
/**
* Execute connectGuru request
* @return GenericSuccessResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public GenericSuccessResponse execute() throws ApiException {
GuruConnectRequest guruConnectRequest = buildBodyParams();
ApiResponse localVarResp = connectGuruWithHttpInfo(guruConnectRequest);
return localVarResp.getResponseBody();
}
/**
* Execute connectGuru request with HTTP info returned
* @return ApiResponse<GenericSuccessResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
GuruConnectRequest guruConnectRequest = buildBodyParams();
return connectGuruWithHttpInfo(guruConnectRequest);
}
/**
* Execute connectGuru request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
GuruConnectRequest guruConnectRequest = buildBodyParams();
return connectGuruAsync(guruConnectRequest, _callback);
}
}
/**
* Guru Connect
* You will need an access token to connect your Guru account. To obtain an access token, follow the steps highlighted here https://help.getguru.com/docs/gurus-api#obtaining-a-user-token. The username should be your Guru username.
* @param guruConnectRequest (required)
* @return ConnectGuruRequestBuilder
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public IntegrationsApi.ConnectGuruRequestBuilder connectGuru(String username, String accessToken) throws IllegalArgumentException {
if (username == null) throw new IllegalArgumentException("\"username\" is required but got null");
if (accessToken == null) throw new IllegalArgumentException("\"accessToken\" is required but got null");
return ((IntegrationsApi) this).new ConnectGuruRequestBuilder(username, accessToken);
}
private okhttp3.Call createAwsIamUserCall(S3AuthRequest s3AuthRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = s3AuthRequest;
// create path and map variables
String localVarPath = "/integrations/s3";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "accessToken", "apiKey", "customerId" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call createAwsIamUserValidateBeforeCall(S3AuthRequest s3AuthRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 's3AuthRequest' is set
if (s3AuthRequest == null) {
throw new ApiException("Missing the required parameter 's3AuthRequest' when calling createAwsIamUser(Async)");
}
return createAwsIamUserCall(s3AuthRequest, _callback);
}
private ApiResponse createAwsIamUserWithHttpInfo(S3AuthRequest s3AuthRequest) throws ApiException {
okhttp3.Call localVarCall = createAwsIamUserValidateBeforeCall(s3AuthRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call createAwsIamUserAsync(S3AuthRequest s3AuthRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createAwsIamUserValidateBeforeCall(s3AuthRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class CreateAwsIamUserRequestBuilderGenerated {
final String accessKey;
final String accessKeySecret;
Boolean syncSourceItems;
String endpointUrl;
public CreateAwsIamUserRequestBuilderGenerated(String accessKey, String accessKeySecret) {
this.accessKey = accessKey;
this.accessKeySecret = accessKeySecret;
}
/**
* Set syncSourceItems
* @param syncSourceItems Enabling this flag will fetch all available content from the source to be listed via list items endpoint (optional, default to true)
* @return IntegrationsApi.CreateAwsIamUserRequestBuilder
*/
public IntegrationsApi.CreateAwsIamUserRequestBuilder syncSourceItems(Boolean syncSourceItems) {
this.syncSourceItems = syncSourceItems;
return (IntegrationsApi.CreateAwsIamUserRequestBuilder) this;
}
/**
* Set endpointUrl
* @param endpointUrl You can specify a Digital Ocean endpoint URL to connect a Digital Ocean Space through this endpoint. The URL should be of format <region>.digitaloceanspaces.com. It's not required for S3 buckets. (optional)
* @return IntegrationsApi.CreateAwsIamUserRequestBuilder
*/
public IntegrationsApi.CreateAwsIamUserRequestBuilder endpointUrl(String endpointUrl) {
this.endpointUrl = endpointUrl;
return (IntegrationsApi.CreateAwsIamUserRequestBuilder) this;
}
/**
* Build call for createAwsIamUser
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
S3AuthRequest s3AuthRequest = buildBodyParams();
return createAwsIamUserCall(s3AuthRequest, _callback);
}
private S3AuthRequest buildBodyParams() {
S3AuthRequest s3AuthRequest = new S3AuthRequest();
s3AuthRequest.accessKey(this.accessKey);
s3AuthRequest.accessKeySecret(this.accessKeySecret);
s3AuthRequest.syncSourceItems(this.syncSourceItems);
s3AuthRequest.endpointUrl(this.endpointUrl);
return s3AuthRequest;
}
/**
* Execute createAwsIamUser request
* @return OrganizationUserDataSourceAPI
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public OrganizationUserDataSourceAPI execute() throws ApiException {
S3AuthRequest s3AuthRequest = buildBodyParams();
ApiResponse localVarResp = createAwsIamUserWithHttpInfo(s3AuthRequest);
return localVarResp.getResponseBody();
}
/**
* Execute createAwsIamUser request with HTTP info returned
* @return ApiResponse<OrganizationUserDataSourceAPI>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
S3AuthRequest s3AuthRequest = buildBodyParams();
return createAwsIamUserWithHttpInfo(s3AuthRequest);
}
/**
* Execute createAwsIamUser request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
S3AuthRequest s3AuthRequest = buildBodyParams();
return createAwsIamUserAsync(s3AuthRequest, _callback);
}
}
/**
* S3 Auth
* This endpoint can be used to connect S3 as well as Digital Ocean Spaces (S3 compatible) For S3, create a new IAM user with permissions to: <ol> <li>List all buckets.</li> <li>Read from the specific buckets and objects to sync with Carbon. Ensure any future buckets or objects carry the same permissions.</li> </ol> Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand. For Digital Ocean Spaces, generate the above credentials in your Applications and API page here https://cloud.digitalocean.com/account/api/spaces. Endpoint URL is required to connect Digital Ocean Spaces. It should look like <<region>>.digitaloceanspaces.com
* @param s3AuthRequest (required)
* @return CreateAwsIamUserRequestBuilder
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public IntegrationsApi.CreateAwsIamUserRequestBuilder createAwsIamUser(String accessKey, String accessKeySecret) throws IllegalArgumentException {
if (accessKey == null) throw new IllegalArgumentException("\"accessKey\" is required but got null");
if (accessKeySecret == null) throw new IllegalArgumentException("\"accessKeySecret\" is required but got null");
return ((IntegrationsApi) this).new CreateAwsIamUserRequestBuilder(accessKey, accessKeySecret);
}
private okhttp3.Call getOauthUrlCall(OAuthURLRequest oauthURLRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = oauthURLRequest;
// create path and map variables
String localVarPath = "/integrations/oauth_url";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "accessToken", "apiKey", "customerId" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getOauthUrlValidateBeforeCall(OAuthURLRequest oauthURLRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'oauthURLRequest' is set
if (oauthURLRequest == null) {
throw new ApiException("Missing the required parameter 'oauthURLRequest' when calling getOauthUrl(Async)");
}
return getOauthUrlCall(oauthURLRequest, _callback);
}
private ApiResponse getOauthUrlWithHttpInfo(OAuthURLRequest oauthURLRequest) throws ApiException {
okhttp3.Call localVarCall = getOauthUrlValidateBeforeCall(oauthURLRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getOauthUrlAsync(OAuthURLRequest oauthURLRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getOauthUrlValidateBeforeCall(oauthURLRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class GetOauthUrlRequestBuilderGenerated {
final OauthBasedConnectors service;
Object tags;
String scope;
Integer chunkSize;
Integer chunkOverlap;
Boolean skipEmbeddingGeneration;
EmbeddingGeneratorsNullable embeddingModel;
String zendeskSubdomain;
String microsoftTenant;
String sharepointSiteName;
String confluenceSubdomain;
Boolean generateSparseVectors;
Boolean prependFilenameToChunks;
Integer maxItemsPerChunk;
String salesforceDomain;
Boolean syncFilesOnConnection;
Boolean setPageAsBoundary;
Integer dataSourceId;
Boolean connectingNewAccount;
String requestId;
Boolean useOcr;
Boolean parsePdfTablesWithOcr;
Boolean enableFilePicker;
Boolean syncSourceItems;
Boolean incrementalSync;
FileSyncConfigNullable fileSyncConfig;
Boolean automaticallyOpenFilePicker;
String gongAccountEmail;
ServiceNowCredentialsNullable servicenowCredentials;
public GetOauthUrlRequestBuilderGenerated(OauthBasedConnectors service) {
this.service = service;
}
/**
* Set tags
* @param tags (optional)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder tags(Object tags) {
this.tags = tags;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set scope
* @param scope (optional)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder scope(String scope) {
this.scope = scope;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set chunkSize
* @param chunkSize (optional, default to 1500)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder chunkSize(Integer chunkSize) {
this.chunkSize = chunkSize;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set chunkOverlap
* @param chunkOverlap (optional, default to 20)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder chunkOverlap(Integer chunkOverlap) {
this.chunkOverlap = chunkOverlap;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set skipEmbeddingGeneration
* @param skipEmbeddingGeneration (optional, default to false)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder skipEmbeddingGeneration(Boolean skipEmbeddingGeneration) {
this.skipEmbeddingGeneration = skipEmbeddingGeneration;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set embeddingModel
* @param embeddingModel (optional, default to OPENAI)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder embeddingModel(EmbeddingGeneratorsNullable embeddingModel) {
this.embeddingModel = embeddingModel;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set zendeskSubdomain
* @param zendeskSubdomain (optional)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder zendeskSubdomain(String zendeskSubdomain) {
this.zendeskSubdomain = zendeskSubdomain;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set microsoftTenant
* @param microsoftTenant (optional)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder microsoftTenant(String microsoftTenant) {
this.microsoftTenant = microsoftTenant;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set sharepointSiteName
* @param sharepointSiteName (optional)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder sharepointSiteName(String sharepointSiteName) {
this.sharepointSiteName = sharepointSiteName;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set confluenceSubdomain
* @param confluenceSubdomain (optional)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder confluenceSubdomain(String confluenceSubdomain) {
this.confluenceSubdomain = confluenceSubdomain;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set generateSparseVectors
* @param generateSparseVectors (optional, default to false)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder generateSparseVectors(Boolean generateSparseVectors) {
this.generateSparseVectors = generateSparseVectors;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set prependFilenameToChunks
* @param prependFilenameToChunks (optional, default to false)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder prependFilenameToChunks(Boolean prependFilenameToChunks) {
this.prependFilenameToChunks = prependFilenameToChunks;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set maxItemsPerChunk
* @param maxItemsPerChunk Number of objects per chunk. For csv, tsv, xlsx, and json files only. (optional)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder maxItemsPerChunk(Integer maxItemsPerChunk) {
this.maxItemsPerChunk = maxItemsPerChunk;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set salesforceDomain
* @param salesforceDomain (optional)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder salesforceDomain(String salesforceDomain) {
this.salesforceDomain = salesforceDomain;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set syncFilesOnConnection
* @param syncFilesOnConnection Used to specify whether Carbon should attempt to sync all your files automatically when authorization is complete. This is only supported for a subset of connectors and will be ignored for the rest. Supported connectors: Intercom, Zendesk, Gitbook, Confluence, Salesforce, Freshdesk (optional, default to true)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder syncFilesOnConnection(Boolean syncFilesOnConnection) {
this.syncFilesOnConnection = syncFilesOnConnection;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set setPageAsBoundary
* @param setPageAsBoundary (optional, default to false)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder setPageAsBoundary(Boolean setPageAsBoundary) {
this.setPageAsBoundary = setPageAsBoundary;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set dataSourceId
* @param dataSourceId Used to specify a data source to sync from if you have multiple connected. It can be skipped if you only have one data source of that type connected or are connecting a new account. (optional)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder dataSourceId(Integer dataSourceId) {
this.dataSourceId = dataSourceId;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set connectingNewAccount
* @param connectingNewAccount Used to connect a new data source. If not specified, we will attempt to create a sync URL for an existing data source based on type and ID. (optional, default to false)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder connectingNewAccount(Boolean connectingNewAccount) {
this.connectingNewAccount = connectingNewAccount;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set requestId
* @param requestId This request id will be added to all files that get synced using the generated OAuth URL (optional)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder requestId(String requestId) {
this.requestId = requestId;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set useOcr
* @param useOcr Enable OCR for files that support it. Supported formats: pdf, png, jpg (optional, default to false)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder useOcr(Boolean useOcr) {
this.useOcr = useOcr;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set parsePdfTablesWithOcr
* @param parsePdfTablesWithOcr (optional, default to false)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder parsePdfTablesWithOcr(Boolean parsePdfTablesWithOcr) {
this.parsePdfTablesWithOcr = parsePdfTablesWithOcr;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set enableFilePicker
* @param enableFilePicker Enable integration's file picker for sources that support it. Supported sources: BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT (optional, default to true)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder enableFilePicker(Boolean enableFilePicker) {
this.enableFilePicker = enableFilePicker;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set syncSourceItems
* @param syncSourceItems Enabling this flag will fetch all available content from the source to be listed via list items endpoint (optional, default to true)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder syncSourceItems(Boolean syncSourceItems) {
this.syncSourceItems = syncSourceItems;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set incrementalSync
* @param incrementalSync Only sync files if they have not already been synced or if the embedding properties have changed. This flag is currently supported by ONEDRIVE, GOOGLE_DRIVE, BOX, DROPBOX, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE, NOTION, SHAREPOINT, SERVICENOW. It will be ignored for other data sources. (optional, default to false)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder incrementalSync(Boolean incrementalSync) {
this.incrementalSync = incrementalSync;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set fileSyncConfig
* @param fileSyncConfig (optional)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder fileSyncConfig(FileSyncConfigNullable fileSyncConfig) {
this.fileSyncConfig = fileSyncConfig;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set automaticallyOpenFilePicker
* @param automaticallyOpenFilePicker Automatically open source file picker after the OAuth flow is complete. This flag is currently supported by BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT. It will be ignored for other data sources. (optional)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder automaticallyOpenFilePicker(Boolean automaticallyOpenFilePicker) {
this.automaticallyOpenFilePicker = automaticallyOpenFilePicker;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set gongAccountEmail
* @param gongAccountEmail If you are connecting a Gong account, you need to input the email of the account you wish to connect. This email will be used to identify your carbon data source. (optional)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder gongAccountEmail(String gongAccountEmail) {
this.gongAccountEmail = gongAccountEmail;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Set servicenowCredentials
* @param servicenowCredentials (optional)
* @return IntegrationsApi.GetOauthUrlRequestBuilder
*/
public IntegrationsApi.GetOauthUrlRequestBuilder servicenowCredentials(ServiceNowCredentialsNullable servicenowCredentials) {
this.servicenowCredentials = servicenowCredentials;
return (IntegrationsApi.GetOauthUrlRequestBuilder) this;
}
/**
* Build call for getOauthUrl
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
OAuthURLRequest oauthURLRequest = buildBodyParams();
return getOauthUrlCall(oauthURLRequest, _callback);
}
private OAuthURLRequest buildBodyParams() {
OAuthURLRequest oauthURLRequest = new OAuthURLRequest();
oauthURLRequest.tags(this.tags);
oauthURLRequest.scope(this.scope);
oauthURLRequest.service(this.service);
oauthURLRequest.chunkSize(this.chunkSize);
oauthURLRequest.chunkOverlap(this.chunkOverlap);
oauthURLRequest.skipEmbeddingGeneration(this.skipEmbeddingGeneration);
oauthURLRequest.embeddingModel(this.embeddingModel);
oauthURLRequest.zendeskSubdomain(this.zendeskSubdomain);
oauthURLRequest.microsoftTenant(this.microsoftTenant);
oauthURLRequest.sharepointSiteName(this.sharepointSiteName);
oauthURLRequest.confluenceSubdomain(this.confluenceSubdomain);
oauthURLRequest.generateSparseVectors(this.generateSparseVectors);
oauthURLRequest.prependFilenameToChunks(this.prependFilenameToChunks);
oauthURLRequest.maxItemsPerChunk(this.maxItemsPerChunk);
oauthURLRequest.salesforceDomain(this.salesforceDomain);
oauthURLRequest.syncFilesOnConnection(this.syncFilesOnConnection);
oauthURLRequest.setPageAsBoundary(this.setPageAsBoundary);
oauthURLRequest.dataSourceId(this.dataSourceId);
oauthURLRequest.connectingNewAccount(this.connectingNewAccount);
oauthURLRequest.requestId(this.requestId);
oauthURLRequest.useOcr(this.useOcr);
oauthURLRequest.parsePdfTablesWithOcr(this.parsePdfTablesWithOcr);
oauthURLRequest.enableFilePicker(this.enableFilePicker);
oauthURLRequest.syncSourceItems(this.syncSourceItems);
oauthURLRequest.incrementalSync(this.incrementalSync);
oauthURLRequest.fileSyncConfig(this.fileSyncConfig);
oauthURLRequest.automaticallyOpenFilePicker(this.automaticallyOpenFilePicker);
oauthURLRequest.gongAccountEmail(this.gongAccountEmail);
oauthURLRequest.servicenowCredentials(this.servicenowCredentials);
return oauthURLRequest;
}
/**
* Execute getOauthUrl request
* @return OuthURLResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public OuthURLResponse execute() throws ApiException {
OAuthURLRequest oauthURLRequest = buildBodyParams();
ApiResponse localVarResp = getOauthUrlWithHttpInfo(oauthURLRequest);
return localVarResp.getResponseBody();
}
/**
* Execute getOauthUrl request with HTTP info returned
* @return ApiResponse<OuthURLResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
OAuthURLRequest oauthURLRequest = buildBodyParams();
return getOauthUrlWithHttpInfo(oauthURLRequest);
}
/**
* Execute getOauthUrl request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
OAuthURLRequest oauthURLRequest = buildBodyParams();
return getOauthUrlAsync(oauthURLRequest, _callback);
}
}
/**
* Get Oauth Url
* This endpoint can be used to generate the following URLs - An OAuth URL for OAuth based connectors - A file syncing URL which skips the OAuth flow if the user already has a valid access token and takes them to the success state.
* @param oauthURLRequest (required)
* @return GetOauthUrlRequestBuilder
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public IntegrationsApi.GetOauthUrlRequestBuilder getOauthUrl(OauthBasedConnectors service) throws IllegalArgumentException {
if (service == null) throw new IllegalArgumentException("\"service\" is required but got null");
return ((IntegrationsApi) this).new GetOauthUrlRequestBuilder(service);
}
private okhttp3.Call listConfluencePagesCall(ListRequest listRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = listRequest;
// create path and map variables
String localVarPath = "/integrations/confluence/list";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "accessToken", "apiKey", "customerId" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@Deprecated
@SuppressWarnings("rawtypes")
private okhttp3.Call listConfluencePagesValidateBeforeCall(ListRequest listRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'listRequest' is set
if (listRequest == null) {
throw new ApiException("Missing the required parameter 'listRequest' when calling listConfluencePages(Async)");
}
return listConfluencePagesCall(listRequest, _callback);
}
private ApiResponse listConfluencePagesWithHttpInfo(ListRequest listRequest) throws ApiException {
okhttp3.Call localVarCall = listConfluencePagesValidateBeforeCall(listRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call listConfluencePagesAsync(ListRequest listRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = listConfluencePagesValidateBeforeCall(listRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class ListConfluencePagesRequestBuilderGenerated {
final Integer dataSourceId;
String parentId;
public ListConfluencePagesRequestBuilderGenerated(Integer dataSourceId) {
this.dataSourceId = dataSourceId;
}
/**
* Set parentId
* @param parentId (optional)
* @return IntegrationsApi.ListConfluencePagesRequestBuilder
*/
public IntegrationsApi.ListConfluencePagesRequestBuilder parentId(String parentId) {
this.parentId = parentId;
return (IntegrationsApi.ListConfluencePagesRequestBuilder) this;
}
/**
* Build call for listConfluencePages
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
* @deprecated
*/
@Deprecated
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
ListRequest listRequest = buildBodyParams();
return listConfluencePagesCall(listRequest, _callback);
}
private ListRequest buildBodyParams() {
ListRequest listRequest = new ListRequest();
listRequest.dataSourceId(this.dataSourceId);
listRequest.parentId(this.parentId);
return listRequest;
}
/**
* Execute listConfluencePages request
* @return ListResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
* @deprecated
*/
@Deprecated
public ListResponse execute() throws ApiException {
ListRequest listRequest = buildBodyParams();
ApiResponse localVarResp = listConfluencePagesWithHttpInfo(listRequest);
return localVarResp.getResponseBody();
}
/**
* Execute listConfluencePages request with HTTP info returned
* @return ApiResponse<ListResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
* @deprecated
*/
@Deprecated
public ApiResponse executeWithHttpInfo() throws ApiException {
ListRequest listRequest = buildBodyParams();
return listConfluencePagesWithHttpInfo(listRequest);
}
/**
* Execute listConfluencePages request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
* @deprecated
*/
@Deprecated
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
ListRequest listRequest = buildBodyParams();
return listConfluencePagesAsync(listRequest, _callback);
}
}
/**
* Confluence List
* This endpoint has been deprecated. Use /integrations/items/list instead. To begin listing a user's Confluence pages, at least a `data_source_id` of a connected Confluence account must be specified. This base request returns a list of root pages for every space the user has access to in a Confluence instance. To traverse further down the user's page directory, additional requests to this endpoint can be made with the same `data_source_id` and with `parent_id` set to the id of page from a previous request. For convenience, the `has_children` property in each directory item in the response list will flag which pages will return non-empty lists of pages when set as the `parent_id`.
* @param listRequest (required)
* @return ListConfluencePagesRequestBuilder
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
* @deprecated
*/
@Deprecated
public IntegrationsApi.ListConfluencePagesRequestBuilder listConfluencePages(Integer dataSourceId) throws IllegalArgumentException {
if (dataSourceId == null) throw new IllegalArgumentException("\"dataSourceId\" is required but got null");
return ((IntegrationsApi) this).new ListConfluencePagesRequestBuilder(dataSourceId);
}
private okhttp3.Call listConversationsCall(String types, String cursor, Integer dataSourceId, Boolean excludeArchived, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/integrations/slack/conversations";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (types != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("types", types));
}
if (cursor != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor));
}
if (dataSourceId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("data_source_id", dataSourceId));
}
if (excludeArchived != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("exclude_archived", excludeArchived));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "accessToken", "apiKey", "customerId" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call listConversationsValidateBeforeCall(String types, String cursor, Integer dataSourceId, Boolean excludeArchived, final ApiCallback _callback) throws ApiException {
return listConversationsCall(types, cursor, dataSourceId, excludeArchived, _callback);
}
private ApiResponse