All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.segment.publicapi.api.SelectiveSyncApi Maven / Gradle / Ivy

There is a newer version: 58.0.0
Show newest version
/*
 * Segment Public API
 * The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs.  All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace.  See the next sections for more information on how to use the Segment Public API. 
 *
 * The version of the OpenAPI document: 32.0.3
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.segment.publicapi.api;

import com.segment.publicapi.ApiCallback;
import com.segment.publicapi.ApiClient;
import com.segment.publicapi.ApiException;
import com.segment.publicapi.ApiResponse;
import com.segment.publicapi.Configuration;
import com.segment.publicapi.Pair;
import com.segment.publicapi.ProgressRequestBody;
import com.segment.publicapi.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import com.segment.publicapi.models.GetAdvancedSyncScheduleFromWarehouse200Response;
import com.segment.publicapi.models.ListSelectiveSyncsFromWarehouseAndSource200Response;
import com.segment.publicapi.models.ListSyncsFromWarehouse200Response;
import com.segment.publicapi.models.ListSyncsFromWarehouseAndSource200Response;
import com.segment.publicapi.models.PaginationInput;
import com.segment.publicapi.models.ReplaceAdvancedSyncScheduleForWarehouse200Response;
import com.segment.publicapi.models.ReplaceAdvancedSyncScheduleForWarehouseV1Input;
import com.segment.publicapi.models.RequestErrorEnvelope;
import com.segment.publicapi.models.UpdateSelectiveSyncForWarehouse200Response;
import com.segment.publicapi.models.UpdateSelectiveSyncForWarehouseV1Input;

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 SelectiveSyncApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

    public SelectiveSyncApi() {
        this(Configuration.getDefaultApiClient());
    }

    public SelectiveSyncApi(ApiClient apiClient) {
        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;
    }

    /**
     * Build call for getAdvancedSyncScheduleFromWarehouse
     * @param warehouseId  (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     
Status Code Description Response Headers
200 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public okhttp3.Call getAdvancedSyncScheduleFromWarehouseCall(String warehouseId, 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 = "/warehouses/{warehouseId}/advanced-sync-schedule" .replaceAll("\\{" + "warehouseId" + "\\}", localVarApiClient.escapeString(warehouseId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/vnd.segment.v1alpha+json", "application/vnd.segment.v1beta+json", "application/vnd.segment.v1+json", "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[] { "token" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getAdvancedSyncScheduleFromWarehouseValidateBeforeCall(String warehouseId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'warehouseId' is set if (warehouseId == null) { throw new ApiException("Missing the required parameter 'warehouseId' when calling getAdvancedSyncScheduleFromWarehouse(Async)"); } okhttp3.Call localVarCall = getAdvancedSyncScheduleFromWarehouseCall(warehouseId, _callback); return localVarCall; } /** * Get Advanced Sync Schedule from Warehouse * Returns the advanced sync schedule for a Warehouse. The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. * @param warehouseId (required) * @return GetAdvancedSyncScheduleFromWarehouse200Response * @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 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public GetAdvancedSyncScheduleFromWarehouse200Response getAdvancedSyncScheduleFromWarehouse(String warehouseId) throws ApiException { ApiResponse localVarResp = getAdvancedSyncScheduleFromWarehouseWithHttpInfo(warehouseId); return localVarResp.getData(); } /** * Get Advanced Sync Schedule from Warehouse * Returns the advanced sync schedule for a Warehouse. The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. * @param warehouseId (required) * @return ApiResponse<GetAdvancedSyncScheduleFromWarehouse200Response> * @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 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public ApiResponse getAdvancedSyncScheduleFromWarehouseWithHttpInfo(String warehouseId) throws ApiException { okhttp3.Call localVarCall = getAdvancedSyncScheduleFromWarehouseValidateBeforeCall(warehouseId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Advanced Sync Schedule from Warehouse (asynchronously) * Returns the advanced sync schedule for a Warehouse. The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. * @param warehouseId (required) * @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 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public okhttp3.Call getAdvancedSyncScheduleFromWarehouseAsync(String warehouseId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAdvancedSyncScheduleFromWarehouseValidateBeforeCall(warehouseId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listSelectiveSyncsFromWarehouseAndSource * @param warehouseId (required) * @param sourceId (required) * @param pagination Defines the pagination parameters. This parameter exists in alpha. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public okhttp3.Call listSelectiveSyncsFromWarehouseAndSourceCall(String warehouseId, String sourceId, PaginationInput pagination, 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 = "/warehouses/{warehouseId}/connected-sources/{sourceId}/selective-syncs" .replaceAll("\\{" + "warehouseId" + "\\}", localVarApiClient.escapeString(warehouseId.toString())) .replaceAll("\\{" + "sourceId" + "\\}", localVarApiClient.escapeString(sourceId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pagination != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pagination", pagination)); } final String[] localVarAccepts = { "application/vnd.segment.v1alpha+json", "application/vnd.segment.v1beta+json", "application/vnd.segment.v1+json", "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[] { "token" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listSelectiveSyncsFromWarehouseAndSourceValidateBeforeCall(String warehouseId, String sourceId, PaginationInput pagination, final ApiCallback _callback) throws ApiException { // verify the required parameter 'warehouseId' is set if (warehouseId == null) { throw new ApiException("Missing the required parameter 'warehouseId' when calling listSelectiveSyncsFromWarehouseAndSource(Async)"); } // verify the required parameter 'sourceId' is set if (sourceId == null) { throw new ApiException("Missing the required parameter 'sourceId' when calling listSelectiveSyncsFromWarehouseAndSource(Async)"); } // verify the required parameter 'pagination' is set if (pagination == null) { throw new ApiException("Missing the required parameter 'pagination' when calling listSelectiveSyncsFromWarehouseAndSource(Async)"); } okhttp3.Call localVarCall = listSelectiveSyncsFromWarehouseAndSourceCall(warehouseId, sourceId, pagination, _callback); return localVarCall; } /** * List Selective Syncs from Warehouse And Source * Returns the schema for a Warehouse, including Sources, Collections, and Properties. The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. * @param warehouseId (required) * @param sourceId (required) * @param pagination Defines the pagination parameters. This parameter exists in alpha. (required) * @return ListSelectiveSyncsFromWarehouseAndSource200Response * @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 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public ListSelectiveSyncsFromWarehouseAndSource200Response listSelectiveSyncsFromWarehouseAndSource(String warehouseId, String sourceId, PaginationInput pagination) throws ApiException { ApiResponse localVarResp = listSelectiveSyncsFromWarehouseAndSourceWithHttpInfo(warehouseId, sourceId, pagination); return localVarResp.getData(); } /** * List Selective Syncs from Warehouse And Source * Returns the schema for a Warehouse, including Sources, Collections, and Properties. The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. * @param warehouseId (required) * @param sourceId (required) * @param pagination Defines the pagination parameters. This parameter exists in alpha. (required) * @return ApiResponse<ListSelectiveSyncsFromWarehouseAndSource200Response> * @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 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public ApiResponse listSelectiveSyncsFromWarehouseAndSourceWithHttpInfo(String warehouseId, String sourceId, PaginationInput pagination) throws ApiException { okhttp3.Call localVarCall = listSelectiveSyncsFromWarehouseAndSourceValidateBeforeCall(warehouseId, sourceId, pagination, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Selective Syncs from Warehouse And Source (asynchronously) * Returns the schema for a Warehouse, including Sources, Collections, and Properties. The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. * @param warehouseId (required) * @param sourceId (required) * @param pagination Defines the pagination parameters. This parameter exists in alpha. (required) * @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 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public okhttp3.Call listSelectiveSyncsFromWarehouseAndSourceAsync(String warehouseId, String sourceId, PaginationInput pagination, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listSelectiveSyncsFromWarehouseAndSourceValidateBeforeCall(warehouseId, sourceId, pagination, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listSyncsFromWarehouse * @param warehouseId (required) * @param pagination Defines the pagination parameters. This parameter exists in alpha. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public okhttp3.Call listSyncsFromWarehouseCall(String warehouseId, PaginationInput pagination, 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 = "/warehouses/{warehouseId}/syncs" .replaceAll("\\{" + "warehouseId" + "\\}", localVarApiClient.escapeString(warehouseId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pagination != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pagination", pagination)); } final String[] localVarAccepts = { "application/vnd.segment.v1alpha+json", "application/vnd.segment.v1beta+json", "application/vnd.segment.v1+json", "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[] { "token" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listSyncsFromWarehouseValidateBeforeCall(String warehouseId, PaginationInput pagination, final ApiCallback _callback) throws ApiException { // verify the required parameter 'warehouseId' is set if (warehouseId == null) { throw new ApiException("Missing the required parameter 'warehouseId' when calling listSyncsFromWarehouse(Async)"); } // verify the required parameter 'pagination' is set if (pagination == null) { throw new ApiException("Missing the required parameter 'pagination' when calling listSyncsFromWarehouse(Async)"); } okhttp3.Call localVarCall = listSyncsFromWarehouseCall(warehouseId, pagination, _callback); return localVarCall; } /** * List Syncs from Warehouse * Returns the overview of syncs for every Source connected to a Warehouse. The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. * @param warehouseId (required) * @param pagination Defines the pagination parameters. This parameter exists in alpha. (required) * @return ListSyncsFromWarehouse200Response * @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 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public ListSyncsFromWarehouse200Response listSyncsFromWarehouse(String warehouseId, PaginationInput pagination) throws ApiException { ApiResponse localVarResp = listSyncsFromWarehouseWithHttpInfo(warehouseId, pagination); return localVarResp.getData(); } /** * List Syncs from Warehouse * Returns the overview of syncs for every Source connected to a Warehouse. The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. * @param warehouseId (required) * @param pagination Defines the pagination parameters. This parameter exists in alpha. (required) * @return ApiResponse<ListSyncsFromWarehouse200Response> * @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 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public ApiResponse listSyncsFromWarehouseWithHttpInfo(String warehouseId, PaginationInput pagination) throws ApiException { okhttp3.Call localVarCall = listSyncsFromWarehouseValidateBeforeCall(warehouseId, pagination, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Syncs from Warehouse (asynchronously) * Returns the overview of syncs for every Source connected to a Warehouse. The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. * @param warehouseId (required) * @param pagination Defines the pagination parameters. This parameter exists in alpha. (required) * @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 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public okhttp3.Call listSyncsFromWarehouseAsync(String warehouseId, PaginationInput pagination, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listSyncsFromWarehouseValidateBeforeCall(warehouseId, pagination, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listSyncsFromWarehouseAndSource * @param warehouseId (required) * @param sourceId (required) * @param pagination Defines the pagination parameters. This parameter exists in alpha. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public okhttp3.Call listSyncsFromWarehouseAndSourceCall(String warehouseId, String sourceId, PaginationInput pagination, 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 = "/warehouses/{warehouseId}/connected-sources/{sourceId}/syncs" .replaceAll("\\{" + "warehouseId" + "\\}", localVarApiClient.escapeString(warehouseId.toString())) .replaceAll("\\{" + "sourceId" + "\\}", localVarApiClient.escapeString(sourceId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pagination != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pagination", pagination)); } final String[] localVarAccepts = { "application/vnd.segment.v1alpha+json", "application/vnd.segment.v1beta+json", "application/vnd.segment.v1+json", "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[] { "token" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listSyncsFromWarehouseAndSourceValidateBeforeCall(String warehouseId, String sourceId, PaginationInput pagination, final ApiCallback _callback) throws ApiException { // verify the required parameter 'warehouseId' is set if (warehouseId == null) { throw new ApiException("Missing the required parameter 'warehouseId' when calling listSyncsFromWarehouseAndSource(Async)"); } // verify the required parameter 'sourceId' is set if (sourceId == null) { throw new ApiException("Missing the required parameter 'sourceId' when calling listSyncsFromWarehouseAndSource(Async)"); } // verify the required parameter 'pagination' is set if (pagination == null) { throw new ApiException("Missing the required parameter 'pagination' when calling listSyncsFromWarehouseAndSource(Async)"); } okhttp3.Call localVarCall = listSyncsFromWarehouseAndSourceCall(warehouseId, sourceId, pagination, _callback); return localVarCall; } /** * List Syncs from Warehouse And Source * Returns the overview of syncs for a Source connected to a Warehouse. The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. * @param warehouseId (required) * @param sourceId (required) * @param pagination Defines the pagination parameters. This parameter exists in alpha. (required) * @return ListSyncsFromWarehouseAndSource200Response * @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 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public ListSyncsFromWarehouseAndSource200Response listSyncsFromWarehouseAndSource(String warehouseId, String sourceId, PaginationInput pagination) throws ApiException { ApiResponse localVarResp = listSyncsFromWarehouseAndSourceWithHttpInfo(warehouseId, sourceId, pagination); return localVarResp.getData(); } /** * List Syncs from Warehouse And Source * Returns the overview of syncs for a Source connected to a Warehouse. The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. * @param warehouseId (required) * @param sourceId (required) * @param pagination Defines the pagination parameters. This parameter exists in alpha. (required) * @return ApiResponse<ListSyncsFromWarehouseAndSource200Response> * @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 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public ApiResponse listSyncsFromWarehouseAndSourceWithHttpInfo(String warehouseId, String sourceId, PaginationInput pagination) throws ApiException { okhttp3.Call localVarCall = listSyncsFromWarehouseAndSourceValidateBeforeCall(warehouseId, sourceId, pagination, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Syncs from Warehouse And Source (asynchronously) * Returns the overview of syncs for a Source connected to a Warehouse. The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. * @param warehouseId (required) * @param sourceId (required) * @param pagination Defines the pagination parameters. This parameter exists in alpha. (required) * @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 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public okhttp3.Call listSyncsFromWarehouseAndSourceAsync(String warehouseId, String sourceId, PaginationInput pagination, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listSyncsFromWarehouseAndSourceValidateBeforeCall(warehouseId, sourceId, pagination, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for replaceAdvancedSyncScheduleForWarehouse * @param warehouseId (required) * @param replaceAdvancedSyncScheduleForWarehouseV1Input (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public okhttp3.Call replaceAdvancedSyncScheduleForWarehouseCall(String warehouseId, ReplaceAdvancedSyncScheduleForWarehouseV1Input replaceAdvancedSyncScheduleForWarehouseV1Input, 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 = replaceAdvancedSyncScheduleForWarehouseV1Input; // create path and map variables String localVarPath = "/warehouses/{warehouseId}/advanced-sync-schedule" .replaceAll("\\{" + "warehouseId" + "\\}", localVarApiClient.escapeString(warehouseId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/vnd.segment.v1alpha+json", "application/vnd.segment.v1beta+json", "application/vnd.segment.v1+json", "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/vnd.segment.v1alpha+json", "application/vnd.segment.v1beta+json", "application/vnd.segment.v1+json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "token" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call replaceAdvancedSyncScheduleForWarehouseValidateBeforeCall(String warehouseId, ReplaceAdvancedSyncScheduleForWarehouseV1Input replaceAdvancedSyncScheduleForWarehouseV1Input, final ApiCallback _callback) throws ApiException { // verify the required parameter 'warehouseId' is set if (warehouseId == null) { throw new ApiException("Missing the required parameter 'warehouseId' when calling replaceAdvancedSyncScheduleForWarehouse(Async)"); } // verify the required parameter 'replaceAdvancedSyncScheduleForWarehouseV1Input' is set if (replaceAdvancedSyncScheduleForWarehouseV1Input == null) { throw new ApiException("Missing the required parameter 'replaceAdvancedSyncScheduleForWarehouseV1Input' when calling replaceAdvancedSyncScheduleForWarehouse(Async)"); } okhttp3.Call localVarCall = replaceAdvancedSyncScheduleForWarehouseCall(warehouseId, replaceAdvancedSyncScheduleForWarehouseV1Input, _callback); return localVarCall; } /** * Replace Advanced Sync Schedule for Warehouse * Updates the advanced sync schedule for a Warehouse, replacing the sync schedule with a new schedule. The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. * @param warehouseId (required) * @param replaceAdvancedSyncScheduleForWarehouseV1Input (required) * @return ReplaceAdvancedSyncScheduleForWarehouse200Response * @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 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public ReplaceAdvancedSyncScheduleForWarehouse200Response replaceAdvancedSyncScheduleForWarehouse(String warehouseId, ReplaceAdvancedSyncScheduleForWarehouseV1Input replaceAdvancedSyncScheduleForWarehouseV1Input) throws ApiException { ApiResponse localVarResp = replaceAdvancedSyncScheduleForWarehouseWithHttpInfo(warehouseId, replaceAdvancedSyncScheduleForWarehouseV1Input); return localVarResp.getData(); } /** * Replace Advanced Sync Schedule for Warehouse * Updates the advanced sync schedule for a Warehouse, replacing the sync schedule with a new schedule. The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. * @param warehouseId (required) * @param replaceAdvancedSyncScheduleForWarehouseV1Input (required) * @return ApiResponse<ReplaceAdvancedSyncScheduleForWarehouse200Response> * @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 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public ApiResponse replaceAdvancedSyncScheduleForWarehouseWithHttpInfo(String warehouseId, ReplaceAdvancedSyncScheduleForWarehouseV1Input replaceAdvancedSyncScheduleForWarehouseV1Input) throws ApiException { okhttp3.Call localVarCall = replaceAdvancedSyncScheduleForWarehouseValidateBeforeCall(warehouseId, replaceAdvancedSyncScheduleForWarehouseV1Input, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Replace Advanced Sync Schedule for Warehouse (asynchronously) * Updates the advanced sync schedule for a Warehouse, replacing the sync schedule with a new schedule. The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. * @param warehouseId (required) * @param replaceAdvancedSyncScheduleForWarehouseV1Input (required) * @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 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public okhttp3.Call replaceAdvancedSyncScheduleForWarehouseAsync(String warehouseId, ReplaceAdvancedSyncScheduleForWarehouseV1Input replaceAdvancedSyncScheduleForWarehouseV1Input, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = replaceAdvancedSyncScheduleForWarehouseValidateBeforeCall(warehouseId, replaceAdvancedSyncScheduleForWarehouseV1Input, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateSelectiveSyncForWarehouse * @param warehouseId (required) * @param updateSelectiveSyncForWarehouseV1Input (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public okhttp3.Call updateSelectiveSyncForWarehouseCall(String warehouseId, UpdateSelectiveSyncForWarehouseV1Input updateSelectiveSyncForWarehouseV1Input, 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 = updateSelectiveSyncForWarehouseV1Input; // create path and map variables String localVarPath = "/warehouses/{warehouseId}/selective-sync" .replaceAll("\\{" + "warehouseId" + "\\}", localVarApiClient.escapeString(warehouseId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/vnd.segment.v1alpha+json", "application/vnd.segment.v1beta+json", "application/vnd.segment.v1+json", "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/vnd.segment.v1alpha+json", "application/vnd.segment.v1beta+json", "application/vnd.segment.v1+json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "token" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateSelectiveSyncForWarehouseValidateBeforeCall(String warehouseId, UpdateSelectiveSyncForWarehouseV1Input updateSelectiveSyncForWarehouseV1Input, final ApiCallback _callback) throws ApiException { // verify the required parameter 'warehouseId' is set if (warehouseId == null) { throw new ApiException("Missing the required parameter 'warehouseId' when calling updateSelectiveSyncForWarehouse(Async)"); } // verify the required parameter 'updateSelectiveSyncForWarehouseV1Input' is set if (updateSelectiveSyncForWarehouseV1Input == null) { throw new ApiException("Missing the required parameter 'updateSelectiveSyncForWarehouseV1Input' when calling updateSelectiveSyncForWarehouse(Async)"); } okhttp3.Call localVarCall = updateSelectiveSyncForWarehouseCall(warehouseId, updateSelectiveSyncForWarehouseV1Input, _callback); return localVarCall; } /** * Update Selective Sync for Warehouse * Configures the schema for a Warehouse, including Sources, Collections, and Properties. When called, this endpoint may generate the `Storage Destination Modified` [Audit Trail](/tag/Audit-Trail) event. The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. * @param warehouseId (required) * @param updateSelectiveSyncForWarehouseV1Input (required) * @return UpdateSelectiveSyncForWarehouse200Response * @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 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public UpdateSelectiveSyncForWarehouse200Response updateSelectiveSyncForWarehouse(String warehouseId, UpdateSelectiveSyncForWarehouseV1Input updateSelectiveSyncForWarehouseV1Input) throws ApiException { ApiResponse localVarResp = updateSelectiveSyncForWarehouseWithHttpInfo(warehouseId, updateSelectiveSyncForWarehouseV1Input); return localVarResp.getData(); } /** * Update Selective Sync for Warehouse * Configures the schema for a Warehouse, including Sources, Collections, and Properties. When called, this endpoint may generate the `Storage Destination Modified` [Audit Trail](/tag/Audit-Trail) event. The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. * @param warehouseId (required) * @param updateSelectiveSyncForWarehouseV1Input (required) * @return ApiResponse<UpdateSelectiveSyncForWarehouse200Response> * @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 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public ApiResponse updateSelectiveSyncForWarehouseWithHttpInfo(String warehouseId, UpdateSelectiveSyncForWarehouseV1Input updateSelectiveSyncForWarehouseV1Input) throws ApiException { okhttp3.Call localVarCall = updateSelectiveSyncForWarehouseValidateBeforeCall(warehouseId, updateSelectiveSyncForWarehouseV1Input, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update Selective Sync for Warehouse (asynchronously) * Configures the schema for a Warehouse, including Sources, Collections, and Properties. When called, this endpoint may generate the `Storage Destination Modified` [Audit Trail](/tag/Audit-Trail) event. The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. * @param warehouseId (required) * @param updateSelectiveSyncForWarehouseV1Input (required) * @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 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
*/ public okhttp3.Call updateSelectiveSyncForWarehouseAsync(String warehouseId, UpdateSelectiveSyncForWarehouseV1Input updateSelectiveSyncForWarehouseV1Input, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateSelectiveSyncForWarehouseValidateBeforeCall(warehouseId, updateSelectiveSyncForWarehouseV1Input, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy