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

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

/*
 * 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.AddConnectionFromSourceToWarehouse200Response;
import com.segment.publicapi.models.CreateValidationInWarehouse200Response;
import com.segment.publicapi.models.CreateValidationInWarehouseV1Input;
import com.segment.publicapi.models.CreateWarehouse200Response;
import com.segment.publicapi.models.CreateWarehouseV1Input;
import com.segment.publicapi.models.DeleteWarehouse200Response;
import com.segment.publicapi.models.GetConnectionStateFromWarehouse200Response;
import com.segment.publicapi.models.GetWarehouse200Response;
import com.segment.publicapi.models.ListConnectedSourcesFromWarehouse200Response;
import com.segment.publicapi.models.ListWarehouses200Response;
import com.segment.publicapi.models.PaginationInput;
import com.segment.publicapi.models.RemoveSourceConnectionFromWarehouse200Response;
import com.segment.publicapi.models.RequestErrorEnvelope;
import com.segment.publicapi.models.UpdateWarehouse200Response;
import com.segment.publicapi.models.UpdateWarehouseV1Input;

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

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

    public WarehousesApi(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 addConnectionFromSourceToWarehouse
     * @param warehouseId  (required)
     * @param sourceId  (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 addConnectionFromSourceToWarehouseCall(String warehouseId, String sourceId, 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}" .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(); 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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addConnectionFromSourceToWarehouseValidateBeforeCall(String warehouseId, String sourceId, 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 addConnectionFromSourceToWarehouse(Async)"); } // verify the required parameter 'sourceId' is set if (sourceId == null) { throw new ApiException("Missing the required parameter 'sourceId' when calling addConnectionFromSourceToWarehouse(Async)"); } okhttp3.Call localVarCall = addConnectionFromSourceToWarehouseCall(warehouseId, sourceId, _callback); return localVarCall; } /** * Add Connection from Source to Warehouse * Connects a Source to a Warehouse. When called, this endpoint may generate the `Storage Destination Modified` [Audit Trail](/tag/Audit-Trail) event. * @param warehouseId (required) * @param sourceId (required) * @return AddConnectionFromSourceToWarehouse200Response * @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 AddConnectionFromSourceToWarehouse200Response addConnectionFromSourceToWarehouse(String warehouseId, String sourceId) throws ApiException { ApiResponse localVarResp = addConnectionFromSourceToWarehouseWithHttpInfo(warehouseId, sourceId); return localVarResp.getData(); } /** * Add Connection from Source to Warehouse * Connects a Source to a Warehouse. When called, this endpoint may generate the `Storage Destination Modified` [Audit Trail](/tag/Audit-Trail) event. * @param warehouseId (required) * @param sourceId (required) * @return ApiResponse<AddConnectionFromSourceToWarehouse200Response> * @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 addConnectionFromSourceToWarehouseWithHttpInfo(String warehouseId, String sourceId) throws ApiException { okhttp3.Call localVarCall = addConnectionFromSourceToWarehouseValidateBeforeCall(warehouseId, sourceId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Add Connection from Source to Warehouse (asynchronously) * Connects a Source to a Warehouse. When called, this endpoint may generate the `Storage Destination Modified` [Audit Trail](/tag/Audit-Trail) event. * @param warehouseId (required) * @param sourceId (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 addConnectionFromSourceToWarehouseAsync(String warehouseId, String sourceId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addConnectionFromSourceToWarehouseValidateBeforeCall(warehouseId, sourceId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createValidationInWarehouse * @param createValidationInWarehouseV1Input (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 createValidationInWarehouseCall(CreateValidationInWarehouseV1Input createValidationInWarehouseV1Input, 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 = createValidationInWarehouseV1Input; // create path and map variables String localVarPath = "/warehouses/validation"; 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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createValidationInWarehouseValidateBeforeCall(CreateValidationInWarehouseV1Input createValidationInWarehouseV1Input, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createValidationInWarehouseV1Input' is set if (createValidationInWarehouseV1Input == null) { throw new ApiException("Missing the required parameter 'createValidationInWarehouseV1Input' when calling createValidationInWarehouse(Async)"); } okhttp3.Call localVarCall = createValidationInWarehouseCall(createValidationInWarehouseV1Input, _callback); return localVarCall; } /** * Create Validation in Warehouse * Validates input settings against a Warehouse. When called, this endpoint may generate the `Storage Destination Settings Validation` [Audit Trail](/tag/Audit-Trail) event. * @param createValidationInWarehouseV1Input (required) * @return CreateValidationInWarehouse200Response * @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 CreateValidationInWarehouse200Response createValidationInWarehouse(CreateValidationInWarehouseV1Input createValidationInWarehouseV1Input) throws ApiException { ApiResponse localVarResp = createValidationInWarehouseWithHttpInfo(createValidationInWarehouseV1Input); return localVarResp.getData(); } /** * Create Validation in Warehouse * Validates input settings against a Warehouse. When called, this endpoint may generate the `Storage Destination Settings Validation` [Audit Trail](/tag/Audit-Trail) event. * @param createValidationInWarehouseV1Input (required) * @return ApiResponse<CreateValidationInWarehouse200Response> * @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 createValidationInWarehouseWithHttpInfo(CreateValidationInWarehouseV1Input createValidationInWarehouseV1Input) throws ApiException { okhttp3.Call localVarCall = createValidationInWarehouseValidateBeforeCall(createValidationInWarehouseV1Input, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create Validation in Warehouse (asynchronously) * Validates input settings against a Warehouse. When called, this endpoint may generate the `Storage Destination Settings Validation` [Audit Trail](/tag/Audit-Trail) event. * @param createValidationInWarehouseV1Input (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 createValidationInWarehouseAsync(CreateValidationInWarehouseV1Input createValidationInWarehouseV1Input, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createValidationInWarehouseValidateBeforeCall(createValidationInWarehouseV1Input, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createWarehouse * @param createWarehouseV1Input (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 createWarehouseCall(CreateWarehouseV1Input createWarehouseV1Input, 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 = createWarehouseV1Input; // create path and map variables String localVarPath = "/warehouses"; 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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createWarehouseValidateBeforeCall(CreateWarehouseV1Input createWarehouseV1Input, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createWarehouseV1Input' is set if (createWarehouseV1Input == null) { throw new ApiException("Missing the required parameter 'createWarehouseV1Input' when calling createWarehouse(Async)"); } okhttp3.Call localVarCall = createWarehouseCall(createWarehouseV1Input, _callback); return localVarCall; } /** * Create Warehouse * Creates a new Warehouse. When called, this endpoint may generate the `Storage Destination Created` [Audit Trail](/tag/Audit-Trail) event. * @param createWarehouseV1Input (required) * @return CreateWarehouse200Response * @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 CreateWarehouse200Response createWarehouse(CreateWarehouseV1Input createWarehouseV1Input) throws ApiException { ApiResponse localVarResp = createWarehouseWithHttpInfo(createWarehouseV1Input); return localVarResp.getData(); } /** * Create Warehouse * Creates a new Warehouse. When called, this endpoint may generate the `Storage Destination Created` [Audit Trail](/tag/Audit-Trail) event. * @param createWarehouseV1Input (required) * @return ApiResponse<CreateWarehouse200Response> * @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 createWarehouseWithHttpInfo(CreateWarehouseV1Input createWarehouseV1Input) throws ApiException { okhttp3.Call localVarCall = createWarehouseValidateBeforeCall(createWarehouseV1Input, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create Warehouse (asynchronously) * Creates a new Warehouse. When called, this endpoint may generate the `Storage Destination Created` [Audit Trail](/tag/Audit-Trail) event. * @param createWarehouseV1Input (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 createWarehouseAsync(CreateWarehouseV1Input createWarehouseV1Input, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createWarehouseValidateBeforeCall(createWarehouseV1Input, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteWarehouse * @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 deleteWarehouseCall(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}" .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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteWarehouseValidateBeforeCall(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 deleteWarehouse(Async)"); } okhttp3.Call localVarCall = deleteWarehouseCall(warehouseId, _callback); return localVarCall; } /** * Delete Warehouse * Deletes an existing Warehouse. When called, this endpoint may generate the `Storage Destination Deleted` [Audit Trail](/tag/Audit-Trail) event. * @param warehouseId (required) * @return DeleteWarehouse200Response * @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 DeleteWarehouse200Response deleteWarehouse(String warehouseId) throws ApiException { ApiResponse localVarResp = deleteWarehouseWithHttpInfo(warehouseId); return localVarResp.getData(); } /** * Delete Warehouse * Deletes an existing Warehouse. When called, this endpoint may generate the `Storage Destination Deleted` [Audit Trail](/tag/Audit-Trail) event. * @param warehouseId (required) * @return ApiResponse<DeleteWarehouse200Response> * @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 deleteWarehouseWithHttpInfo(String warehouseId) throws ApiException { okhttp3.Call localVarCall = deleteWarehouseValidateBeforeCall(warehouseId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete Warehouse (asynchronously) * Deletes an existing Warehouse. When called, this endpoint may generate the `Storage Destination Deleted` [Audit Trail](/tag/Audit-Trail) event. * @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 deleteWarehouseAsync(String warehouseId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteWarehouseValidateBeforeCall(warehouseId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getConnectionStateFromWarehouse * @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 getConnectionStateFromWarehouseCall(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}/connection-state" .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 getConnectionStateFromWarehouseValidateBeforeCall(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 getConnectionStateFromWarehouse(Async)"); } okhttp3.Call localVarCall = getConnectionStateFromWarehouseCall(warehouseId, _callback); return localVarCall; } /** * Get Connection State from Warehouse * Verifies the state of Warehouse connection settings. The rate limit for this endpoint is 20 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 GetConnectionStateFromWarehouse200Response * @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 GetConnectionStateFromWarehouse200Response getConnectionStateFromWarehouse(String warehouseId) throws ApiException { ApiResponse localVarResp = getConnectionStateFromWarehouseWithHttpInfo(warehouseId); return localVarResp.getData(); } /** * Get Connection State from Warehouse * Verifies the state of Warehouse connection settings. The rate limit for this endpoint is 20 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<GetConnectionStateFromWarehouse200Response> * @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 getConnectionStateFromWarehouseWithHttpInfo(String warehouseId) throws ApiException { okhttp3.Call localVarCall = getConnectionStateFromWarehouseValidateBeforeCall(warehouseId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Connection State from Warehouse (asynchronously) * Verifies the state of Warehouse connection settings. The rate limit for this endpoint is 20 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 getConnectionStateFromWarehouseAsync(String warehouseId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getConnectionStateFromWarehouseValidateBeforeCall(warehouseId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getWarehouse * @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 getWarehouseCall(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}" .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 getWarehouseValidateBeforeCall(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 getWarehouse(Async)"); } okhttp3.Call localVarCall = getWarehouseCall(warehouseId, _callback); return localVarCall; } /** * Get Warehouse * Returns a Warehouse by its id. * @param warehouseId (required) * @return GetWarehouse200Response * @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 GetWarehouse200Response getWarehouse(String warehouseId) throws ApiException { ApiResponse localVarResp = getWarehouseWithHttpInfo(warehouseId); return localVarResp.getData(); } /** * Get Warehouse * Returns a Warehouse by its id. * @param warehouseId (required) * @return ApiResponse<GetWarehouse200Response> * @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 getWarehouseWithHttpInfo(String warehouseId) throws ApiException { okhttp3.Call localVarCall = getWarehouseValidateBeforeCall(warehouseId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Warehouse (asynchronously) * Returns a Warehouse by its id. * @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 getWarehouseAsync(String warehouseId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getWarehouseValidateBeforeCall(warehouseId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listConnectedSourcesFromWarehouse * @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 listConnectedSourcesFromWarehouseCall(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}/connected-sources" .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 listConnectedSourcesFromWarehouseValidateBeforeCall(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 listConnectedSourcesFromWarehouse(Async)"); } // verify the required parameter 'pagination' is set if (pagination == null) { throw new ApiException("Missing the required parameter 'pagination' when calling listConnectedSourcesFromWarehouse(Async)"); } okhttp3.Call localVarCall = listConnectedSourcesFromWarehouseCall(warehouseId, pagination, _callback); return localVarCall; } /** * List Connected Sources from Warehouse * Returns the list of Sources that are connected to a Warehouse. * @param warehouseId (required) * @param pagination Defines the pagination parameters. This parameter exists in alpha. (required) * @return ListConnectedSourcesFromWarehouse200Response * @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 ListConnectedSourcesFromWarehouse200Response listConnectedSourcesFromWarehouse(String warehouseId, PaginationInput pagination) throws ApiException { ApiResponse localVarResp = listConnectedSourcesFromWarehouseWithHttpInfo(warehouseId, pagination); return localVarResp.getData(); } /** * List Connected Sources from Warehouse * Returns the list of Sources that are connected to a Warehouse. * @param warehouseId (required) * @param pagination Defines the pagination parameters. This parameter exists in alpha. (required) * @return ApiResponse<ListConnectedSourcesFromWarehouse200Response> * @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 listConnectedSourcesFromWarehouseWithHttpInfo(String warehouseId, PaginationInput pagination) throws ApiException { okhttp3.Call localVarCall = listConnectedSourcesFromWarehouseValidateBeforeCall(warehouseId, pagination, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Connected Sources from Warehouse (asynchronously) * Returns the list of Sources that are connected to a Warehouse. * @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 listConnectedSourcesFromWarehouseAsync(String warehouseId, PaginationInput pagination, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listConnectedSourcesFromWarehouseValidateBeforeCall(warehouseId, pagination, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listWarehouses * @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 listWarehousesCall(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"; 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 listWarehousesValidateBeforeCall(PaginationInput pagination, final ApiCallback _callback) throws ApiException { // verify the required parameter 'pagination' is set if (pagination == null) { throw new ApiException("Missing the required parameter 'pagination' when calling listWarehouses(Async)"); } okhttp3.Call localVarCall = listWarehousesCall(pagination, _callback); return localVarCall; } /** * List Warehouses * Returns a list of Warehouses. * @param pagination Defines the pagination parameters. This parameter exists in alpha. (required) * @return ListWarehouses200Response * @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 ListWarehouses200Response listWarehouses(PaginationInput pagination) throws ApiException { ApiResponse localVarResp = listWarehousesWithHttpInfo(pagination); return localVarResp.getData(); } /** * List Warehouses * Returns a list of Warehouses. * @param pagination Defines the pagination parameters. This parameter exists in alpha. (required) * @return ApiResponse<ListWarehouses200Response> * @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 listWarehousesWithHttpInfo(PaginationInput pagination) throws ApiException { okhttp3.Call localVarCall = listWarehousesValidateBeforeCall(pagination, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Warehouses (asynchronously) * Returns a list of Warehouses. * @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 listWarehousesAsync(PaginationInput pagination, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listWarehousesValidateBeforeCall(pagination, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for removeSourceConnectionFromWarehouse * @param warehouseId (required) * @param sourceId (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 removeSourceConnectionFromWarehouseCall(String warehouseId, String sourceId, 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}" .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(); 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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call removeSourceConnectionFromWarehouseValidateBeforeCall(String warehouseId, String sourceId, 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 removeSourceConnectionFromWarehouse(Async)"); } // verify the required parameter 'sourceId' is set if (sourceId == null) { throw new ApiException("Missing the required parameter 'sourceId' when calling removeSourceConnectionFromWarehouse(Async)"); } okhttp3.Call localVarCall = removeSourceConnectionFromWarehouseCall(warehouseId, sourceId, _callback); return localVarCall; } /** * Remove Source Connection from Warehouse * Disconnects a Source from a Warehouse. * @param warehouseId (required) * @param sourceId (required) * @return RemoveSourceConnectionFromWarehouse200Response * @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 RemoveSourceConnectionFromWarehouse200Response removeSourceConnectionFromWarehouse(String warehouseId, String sourceId) throws ApiException { ApiResponse localVarResp = removeSourceConnectionFromWarehouseWithHttpInfo(warehouseId, sourceId); return localVarResp.getData(); } /** * Remove Source Connection from Warehouse * Disconnects a Source from a Warehouse. * @param warehouseId (required) * @param sourceId (required) * @return ApiResponse<RemoveSourceConnectionFromWarehouse200Response> * @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 removeSourceConnectionFromWarehouseWithHttpInfo(String warehouseId, String sourceId) throws ApiException { okhttp3.Call localVarCall = removeSourceConnectionFromWarehouseValidateBeforeCall(warehouseId, sourceId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Remove Source Connection from Warehouse (asynchronously) * Disconnects a Source from a Warehouse. * @param warehouseId (required) * @param sourceId (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 removeSourceConnectionFromWarehouseAsync(String warehouseId, String sourceId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = removeSourceConnectionFromWarehouseValidateBeforeCall(warehouseId, sourceId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateWarehouse * @param warehouseId (required) * @param updateWarehouseV1Input (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 updateWarehouseCall(String warehouseId, UpdateWarehouseV1Input updateWarehouseV1Input, 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 = updateWarehouseV1Input; // create path and map variables String localVarPath = "/warehouses/{warehouseId}" .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 updateWarehouseValidateBeforeCall(String warehouseId, UpdateWarehouseV1Input updateWarehouseV1Input, 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 updateWarehouse(Async)"); } // verify the required parameter 'updateWarehouseV1Input' is set if (updateWarehouseV1Input == null) { throw new ApiException("Missing the required parameter 'updateWarehouseV1Input' when calling updateWarehouse(Async)"); } okhttp3.Call localVarCall = updateWarehouseCall(warehouseId, updateWarehouseV1Input, _callback); return localVarCall; } /** * Update Warehouse * Updates an existing Warehouse. When called, this endpoint may generate one or more of the following [Audit Trail](/tag/Audit-Trail) events: * Storage Destination Modified * Storage Destination Enabled * @param warehouseId (required) * @param updateWarehouseV1Input (required) * @return UpdateWarehouse200Response * @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 UpdateWarehouse200Response updateWarehouse(String warehouseId, UpdateWarehouseV1Input updateWarehouseV1Input) throws ApiException { ApiResponse localVarResp = updateWarehouseWithHttpInfo(warehouseId, updateWarehouseV1Input); return localVarResp.getData(); } /** * Update Warehouse * Updates an existing Warehouse. When called, this endpoint may generate one or more of the following [Audit Trail](/tag/Audit-Trail) events: * Storage Destination Modified * Storage Destination Enabled * @param warehouseId (required) * @param updateWarehouseV1Input (required) * @return ApiResponse<UpdateWarehouse200Response> * @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 updateWarehouseWithHttpInfo(String warehouseId, UpdateWarehouseV1Input updateWarehouseV1Input) throws ApiException { okhttp3.Call localVarCall = updateWarehouseValidateBeforeCall(warehouseId, updateWarehouseV1Input, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update Warehouse (asynchronously) * Updates an existing Warehouse. When called, this endpoint may generate one or more of the following [Audit Trail](/tag/Audit-Trail) events: * Storage Destination Modified * Storage Destination Enabled * @param warehouseId (required) * @param updateWarehouseV1Input (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 updateWarehouseAsync(String warehouseId, UpdateWarehouseV1Input updateWarehouseV1Input, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateWarehouseValidateBeforeCall(warehouseId, updateWarehouseV1Input, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy