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

com.segment.publicapi.api.SourcesApi 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.AddLabelsToSource200Response;
import com.segment.publicapi.models.AddLabelsToSource200Response1;
import com.segment.publicapi.models.AddLabelsToSourceAlphaInput;
import com.segment.publicapi.models.AddLabelsToSourceV1Input;
import com.segment.publicapi.models.CreateSource200Response;
import com.segment.publicapi.models.CreateSource200Response1;
import com.segment.publicapi.models.CreateSourceAlphaInput;
import com.segment.publicapi.models.CreateSourceV1Input;
import com.segment.publicapi.models.DeleteSource200Response;
import com.segment.publicapi.models.DeleteSource200Response1;
import com.segment.publicapi.models.GetSource200Response;
import com.segment.publicapi.models.GetSource200Response1;
import com.segment.publicapi.models.ListConnectedDestinationsFromSource200Response;
import com.segment.publicapi.models.ListConnectedDestinationsFromSource200Response1;
import com.segment.publicapi.models.ListConnectedWarehousesFromSource200Response;
import com.segment.publicapi.models.ListConnectedWarehousesFromSource200Response1;
import com.segment.publicapi.models.ListSchemaSettingsInSource200Response;
import com.segment.publicapi.models.ListSources200Response;
import com.segment.publicapi.models.ListSources200Response1;
import com.segment.publicapi.models.PaginationInput;
import com.segment.publicapi.models.ReplaceLabelsInSource200Response;
import com.segment.publicapi.models.ReplaceLabelsInSource200Response1;
import com.segment.publicapi.models.ReplaceLabelsInSourceAlphaInput;
import com.segment.publicapi.models.ReplaceLabelsInSourceV1Input;
import com.segment.publicapi.models.RequestErrorEnvelope;
import com.segment.publicapi.models.UpdateSchemaSettingsInSource200Response;
import com.segment.publicapi.models.UpdateSchemaSettingsInSourceV1Input;
import com.segment.publicapi.models.UpdateSource200Response;
import com.segment.publicapi.models.UpdateSource200Response1;
import com.segment.publicapi.models.UpdateSourceAlphaInput;
import com.segment.publicapi.models.UpdateSourceV1Input;

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

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

    public SourcesApi(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 addLabelsToSource
     * @param sourceId  (required)
     * @param addLabelsToSourceAlphaInput  (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 addLabelsToSourceCall(String sourceId, AddLabelsToSourceAlphaInput addLabelsToSourceAlphaInput, 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 = addLabelsToSourceAlphaInput; // create path and map variables String localVarPath = "/sources/{sourceId}/labels" .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 = { "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 addLabelsToSourceValidateBeforeCall(String sourceId, AddLabelsToSourceAlphaInput addLabelsToSourceAlphaInput, final ApiCallback _callback) throws ApiException { // verify the required parameter 'sourceId' is set if (sourceId == null) { throw new ApiException("Missing the required parameter 'sourceId' when calling addLabelsToSource(Async)"); } // verify the required parameter 'addLabelsToSourceAlphaInput' is set if (addLabelsToSourceAlphaInput == null) { throw new ApiException("Missing the required parameter 'addLabelsToSourceAlphaInput' when calling addLabelsToSource(Async)"); } okhttp3.Call localVarCall = addLabelsToSourceCall(sourceId, addLabelsToSourceAlphaInput, _callback); return localVarCall; } /** * Add Labels to Source * Adds an existing label to a Source. When called, this endpoint may generate the `Source Modified` [Audit Trail](/tag/Audit-Trail) event. * @param sourceId (required) * @param addLabelsToSourceAlphaInput (required) * @return AddLabelsToSource200Response * @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 AddLabelsToSource200Response addLabelsToSource(String sourceId, AddLabelsToSourceAlphaInput addLabelsToSourceAlphaInput) throws ApiException { ApiResponse localVarResp = addLabelsToSourceWithHttpInfo(sourceId, addLabelsToSourceAlphaInput); return localVarResp.getData(); } /** * Add Labels to Source * Adds an existing label to a Source. When called, this endpoint may generate the `Source Modified` [Audit Trail](/tag/Audit-Trail) event. * @param sourceId (required) * @param addLabelsToSourceAlphaInput (required) * @return ApiResponse<AddLabelsToSource200Response> * @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 addLabelsToSourceWithHttpInfo(String sourceId, AddLabelsToSourceAlphaInput addLabelsToSourceAlphaInput) throws ApiException { okhttp3.Call localVarCall = addLabelsToSourceValidateBeforeCall(sourceId, addLabelsToSourceAlphaInput, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Add Labels to Source (asynchronously) * Adds an existing label to a Source. When called, this endpoint may generate the `Source Modified` [Audit Trail](/tag/Audit-Trail) event. * @param sourceId (required) * @param addLabelsToSourceAlphaInput (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 addLabelsToSourceAsync(String sourceId, AddLabelsToSourceAlphaInput addLabelsToSourceAlphaInput, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addLabelsToSourceValidateBeforeCall(sourceId, addLabelsToSourceAlphaInput, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createSource * @param createSourceAlphaInput (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 createSourceCall(CreateSourceAlphaInput createSourceAlphaInput, 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 = createSourceAlphaInput; // create path and map variables String localVarPath = "/sources"; 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 createSourceValidateBeforeCall(CreateSourceAlphaInput createSourceAlphaInput, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createSourceAlphaInput' is set if (createSourceAlphaInput == null) { throw new ApiException("Missing the required parameter 'createSourceAlphaInput' when calling createSource(Async)"); } okhttp3.Call localVarCall = createSourceCall(createSourceAlphaInput, _callback); return localVarCall; } /** * Create Source * Creates a new Source. When called, this endpoint may generate the `Source Created` [Audit Trail](/tag/Audit-Trail) event. * @param createSourceAlphaInput (required) * @return CreateSource200Response * @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 CreateSource200Response createSource(CreateSourceAlphaInput createSourceAlphaInput) throws ApiException { ApiResponse localVarResp = createSourceWithHttpInfo(createSourceAlphaInput); return localVarResp.getData(); } /** * Create Source * Creates a new Source. When called, this endpoint may generate the `Source Created` [Audit Trail](/tag/Audit-Trail) event. * @param createSourceAlphaInput (required) * @return ApiResponse<CreateSource200Response> * @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 createSourceWithHttpInfo(CreateSourceAlphaInput createSourceAlphaInput) throws ApiException { okhttp3.Call localVarCall = createSourceValidateBeforeCall(createSourceAlphaInput, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create Source (asynchronously) * Creates a new Source. When called, this endpoint may generate the `Source Created` [Audit Trail](/tag/Audit-Trail) event. * @param createSourceAlphaInput (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 createSourceAsync(CreateSourceAlphaInput createSourceAlphaInput, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createSourceValidateBeforeCall(createSourceAlphaInput, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteSource * @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 deleteSourceCall(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 = "/sources/{sourceId}" .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 deleteSourceValidateBeforeCall(String sourceId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'sourceId' is set if (sourceId == null) { throw new ApiException("Missing the required parameter 'sourceId' when calling deleteSource(Async)"); } okhttp3.Call localVarCall = deleteSourceCall(sourceId, _callback); return localVarCall; } /** * Delete Source * Deletes an existing Source. When called, this endpoint may generate the `Source Deleted` [Audit Trail](/tag/Audit-Trail) event. * @param sourceId (required) * @return DeleteSource200Response * @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 DeleteSource200Response deleteSource(String sourceId) throws ApiException { ApiResponse localVarResp = deleteSourceWithHttpInfo(sourceId); return localVarResp.getData(); } /** * Delete Source * Deletes an existing Source. When called, this endpoint may generate the `Source Deleted` [Audit Trail](/tag/Audit-Trail) event. * @param sourceId (required) * @return ApiResponse<DeleteSource200Response> * @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 deleteSourceWithHttpInfo(String sourceId) throws ApiException { okhttp3.Call localVarCall = deleteSourceValidateBeforeCall(sourceId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete Source (asynchronously) * Deletes an existing Source. When called, this endpoint may generate the `Source Deleted` [Audit Trail](/tag/Audit-Trail) event. * @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 deleteSourceAsync(String sourceId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteSourceValidateBeforeCall(sourceId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getSource * @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 getSourceCall(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 = "/sources/{sourceId}" .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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getSourceValidateBeforeCall(String sourceId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'sourceId' is set if (sourceId == null) { throw new ApiException("Missing the required parameter 'sourceId' when calling getSource(Async)"); } okhttp3.Call localVarCall = getSourceCall(sourceId, _callback); return localVarCall; } /** * Get Source * Returns a Source by its id. * @param sourceId (required) * @return GetSource200Response * @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 GetSource200Response getSource(String sourceId) throws ApiException { ApiResponse localVarResp = getSourceWithHttpInfo(sourceId); return localVarResp.getData(); } /** * Get Source * Returns a Source by its id. * @param sourceId (required) * @return ApiResponse<GetSource200Response> * @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 getSourceWithHttpInfo(String sourceId) throws ApiException { okhttp3.Call localVarCall = getSourceValidateBeforeCall(sourceId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Source (asynchronously) * Returns a Source by its id. * @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 getSourceAsync(String sourceId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getSourceValidateBeforeCall(sourceId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listConnectedDestinationsFromSource * @param sourceId (required) * @param pagination Required pagination params for the request. This parameter exists in beta. (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 listConnectedDestinationsFromSourceCall(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 = "/sources/{sourceId}/connected-destinations" .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 listConnectedDestinationsFromSourceValidateBeforeCall(String sourceId, PaginationInput pagination, final ApiCallback _callback) throws ApiException { // verify the required parameter 'sourceId' is set if (sourceId == null) { throw new ApiException("Missing the required parameter 'sourceId' when calling listConnectedDestinationsFromSource(Async)"); } // verify the required parameter 'pagination' is set if (pagination == null) { throw new ApiException("Missing the required parameter 'pagination' when calling listConnectedDestinationsFromSource(Async)"); } okhttp3.Call localVarCall = listConnectedDestinationsFromSourceCall(sourceId, pagination, _callback); return localVarCall; } /** * List Connected Destinations from Source * Returns a list of Destinations connected to a Source. * @param sourceId (required) * @param pagination Required pagination params for the request. This parameter exists in beta. (required) * @return ListConnectedDestinationsFromSource200Response * @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 ListConnectedDestinationsFromSource200Response listConnectedDestinationsFromSource(String sourceId, PaginationInput pagination) throws ApiException { ApiResponse localVarResp = listConnectedDestinationsFromSourceWithHttpInfo(sourceId, pagination); return localVarResp.getData(); } /** * List Connected Destinations from Source * Returns a list of Destinations connected to a Source. * @param sourceId (required) * @param pagination Required pagination params for the request. This parameter exists in beta. (required) * @return ApiResponse<ListConnectedDestinationsFromSource200Response> * @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 listConnectedDestinationsFromSourceWithHttpInfo(String sourceId, PaginationInput pagination) throws ApiException { okhttp3.Call localVarCall = listConnectedDestinationsFromSourceValidateBeforeCall(sourceId, pagination, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Connected Destinations from Source (asynchronously) * Returns a list of Destinations connected to a Source. * @param sourceId (required) * @param pagination Required pagination params for the request. This parameter exists in beta. (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 listConnectedDestinationsFromSourceAsync(String sourceId, PaginationInput pagination, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listConnectedDestinationsFromSourceValidateBeforeCall(sourceId, pagination, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listConnectedWarehousesFromSource * @param sourceId (required) * @param pagination Required pagination params for the request. This parameter exists in beta. (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 listConnectedWarehousesFromSourceCall(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 = "/sources/{sourceId}/connected-warehouses" .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 listConnectedWarehousesFromSourceValidateBeforeCall(String sourceId, PaginationInput pagination, final ApiCallback _callback) throws ApiException { // verify the required parameter 'sourceId' is set if (sourceId == null) { throw new ApiException("Missing the required parameter 'sourceId' when calling listConnectedWarehousesFromSource(Async)"); } // verify the required parameter 'pagination' is set if (pagination == null) { throw new ApiException("Missing the required parameter 'pagination' when calling listConnectedWarehousesFromSource(Async)"); } okhttp3.Call localVarCall = listConnectedWarehousesFromSourceCall(sourceId, pagination, _callback); return localVarCall; } /** * List Connected Warehouses from Source * Returns a list of Warehouses connected to a Source. * @param sourceId (required) * @param pagination Required pagination params for the request. This parameter exists in beta. (required) * @return ListConnectedWarehousesFromSource200Response * @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 ListConnectedWarehousesFromSource200Response listConnectedWarehousesFromSource(String sourceId, PaginationInput pagination) throws ApiException { ApiResponse localVarResp = listConnectedWarehousesFromSourceWithHttpInfo(sourceId, pagination); return localVarResp.getData(); } /** * List Connected Warehouses from Source * Returns a list of Warehouses connected to a Source. * @param sourceId (required) * @param pagination Required pagination params for the request. This parameter exists in beta. (required) * @return ApiResponse<ListConnectedWarehousesFromSource200Response> * @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 listConnectedWarehousesFromSourceWithHttpInfo(String sourceId, PaginationInput pagination) throws ApiException { okhttp3.Call localVarCall = listConnectedWarehousesFromSourceValidateBeforeCall(sourceId, pagination, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Connected Warehouses from Source (asynchronously) * Returns a list of Warehouses connected to a Source. * @param sourceId (required) * @param pagination Required pagination params for the request. This parameter exists in beta. (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 listConnectedWarehousesFromSourceAsync(String sourceId, PaginationInput pagination, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listConnectedWarehousesFromSourceValidateBeforeCall(sourceId, pagination, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listSchemaSettingsInSource * @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 listSchemaSettingsInSourceCall(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 = "/sources/{sourceId}/settings" .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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listSchemaSettingsInSourceValidateBeforeCall(String sourceId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'sourceId' is set if (sourceId == null) { throw new ApiException("Missing the required parameter 'sourceId' when calling listSchemaSettingsInSource(Async)"); } okhttp3.Call localVarCall = listSchemaSettingsInSourceCall(sourceId, _callback); return localVarCall; } /** * List Schema Settings in Source * Retrieves the schema configuration settings for a Source. If Protocols is not enabled for the Source, the configurations specific to Protocols will have default values. * @param sourceId (required) * @return ListSchemaSettingsInSource200Response * @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 ListSchemaSettingsInSource200Response listSchemaSettingsInSource(String sourceId) throws ApiException { ApiResponse localVarResp = listSchemaSettingsInSourceWithHttpInfo(sourceId); return localVarResp.getData(); } /** * List Schema Settings in Source * Retrieves the schema configuration settings for a Source. If Protocols is not enabled for the Source, the configurations specific to Protocols will have default values. * @param sourceId (required) * @return ApiResponse<ListSchemaSettingsInSource200Response> * @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 listSchemaSettingsInSourceWithHttpInfo(String sourceId) throws ApiException { okhttp3.Call localVarCall = listSchemaSettingsInSourceValidateBeforeCall(sourceId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Schema Settings in Source (asynchronously) * Retrieves the schema configuration settings for a Source. If Protocols is not enabled for the Source, the configurations specific to Protocols will have default values. * @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 listSchemaSettingsInSourceAsync(String sourceId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listSchemaSettingsInSourceValidateBeforeCall(sourceId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listSources * @param pagination Defines the pagination parameters. This parameter exists in beta. (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 listSourcesCall(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 = "/sources"; 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 listSourcesValidateBeforeCall(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 listSources(Async)"); } okhttp3.Call localVarCall = listSourcesCall(pagination, _callback); return localVarCall; } /** * List Sources * Returns a list of Sources. * @param pagination Defines the pagination parameters. This parameter exists in beta. (required) * @return ListSources200Response * @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 ListSources200Response listSources(PaginationInput pagination) throws ApiException { ApiResponse localVarResp = listSourcesWithHttpInfo(pagination); return localVarResp.getData(); } /** * List Sources * Returns a list of Sources. * @param pagination Defines the pagination parameters. This parameter exists in beta. (required) * @return ApiResponse<ListSources200Response> * @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 listSourcesWithHttpInfo(PaginationInput pagination) throws ApiException { okhttp3.Call localVarCall = listSourcesValidateBeforeCall(pagination, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Sources (asynchronously) * Returns a list of Sources. * @param pagination Defines the pagination parameters. This parameter exists in beta. (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 listSourcesAsync(PaginationInput pagination, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listSourcesValidateBeforeCall(pagination, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for replaceLabelsInSource * @param sourceId (required) * @param replaceLabelsInSourceAlphaInput (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 replaceLabelsInSourceCall(String sourceId, ReplaceLabelsInSourceAlphaInput replaceLabelsInSourceAlphaInput, 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 = replaceLabelsInSourceAlphaInput; // create path and map variables String localVarPath = "/sources/{sourceId}/labels" .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 = { "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 replaceLabelsInSourceValidateBeforeCall(String sourceId, ReplaceLabelsInSourceAlphaInput replaceLabelsInSourceAlphaInput, final ApiCallback _callback) throws ApiException { // verify the required parameter 'sourceId' is set if (sourceId == null) { throw new ApiException("Missing the required parameter 'sourceId' when calling replaceLabelsInSource(Async)"); } // verify the required parameter 'replaceLabelsInSourceAlphaInput' is set if (replaceLabelsInSourceAlphaInput == null) { throw new ApiException("Missing the required parameter 'replaceLabelsInSourceAlphaInput' when calling replaceLabelsInSource(Async)"); } okhttp3.Call localVarCall = replaceLabelsInSourceCall(sourceId, replaceLabelsInSourceAlphaInput, _callback); return localVarCall; } /** * Replace Labels in Source * Replaces all labels in a Source. * @param sourceId (required) * @param replaceLabelsInSourceAlphaInput (required) * @return ReplaceLabelsInSource200Response * @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 ReplaceLabelsInSource200Response replaceLabelsInSource(String sourceId, ReplaceLabelsInSourceAlphaInput replaceLabelsInSourceAlphaInput) throws ApiException { ApiResponse localVarResp = replaceLabelsInSourceWithHttpInfo(sourceId, replaceLabelsInSourceAlphaInput); return localVarResp.getData(); } /** * Replace Labels in Source * Replaces all labels in a Source. * @param sourceId (required) * @param replaceLabelsInSourceAlphaInput (required) * @return ApiResponse<ReplaceLabelsInSource200Response> * @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 replaceLabelsInSourceWithHttpInfo(String sourceId, ReplaceLabelsInSourceAlphaInput replaceLabelsInSourceAlphaInput) throws ApiException { okhttp3.Call localVarCall = replaceLabelsInSourceValidateBeforeCall(sourceId, replaceLabelsInSourceAlphaInput, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Replace Labels in Source (asynchronously) * Replaces all labels in a Source. * @param sourceId (required) * @param replaceLabelsInSourceAlphaInput (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 replaceLabelsInSourceAsync(String sourceId, ReplaceLabelsInSourceAlphaInput replaceLabelsInSourceAlphaInput, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = replaceLabelsInSourceValidateBeforeCall(sourceId, replaceLabelsInSourceAlphaInput, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateSchemaSettingsInSource * @param sourceId (required) * @param updateSchemaSettingsInSourceV1Input (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 updateSchemaSettingsInSourceCall(String sourceId, UpdateSchemaSettingsInSourceV1Input updateSchemaSettingsInSourceV1Input, 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 = updateSchemaSettingsInSourceV1Input; // create path and map variables String localVarPath = "/sources/{sourceId}/settings" .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 = { "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 updateSchemaSettingsInSourceValidateBeforeCall(String sourceId, UpdateSchemaSettingsInSourceV1Input updateSchemaSettingsInSourceV1Input, final ApiCallback _callback) throws ApiException { // verify the required parameter 'sourceId' is set if (sourceId == null) { throw new ApiException("Missing the required parameter 'sourceId' when calling updateSchemaSettingsInSource(Async)"); } // verify the required parameter 'updateSchemaSettingsInSourceV1Input' is set if (updateSchemaSettingsInSourceV1Input == null) { throw new ApiException("Missing the required parameter 'updateSchemaSettingsInSourceV1Input' when calling updateSchemaSettingsInSource(Async)"); } okhttp3.Call localVarCall = updateSchemaSettingsInSourceCall(sourceId, updateSchemaSettingsInSourceV1Input, _callback); return localVarCall; } /** * Update Schema Settings in Source * Updates the schema configuration for a Source. If Protocols is not enabled for the Source, any updates to Protocols-specific configurations will not be applied. Config API omitted fields: - `updateMask` * @param sourceId (required) * @param updateSchemaSettingsInSourceV1Input (required) * @return UpdateSchemaSettingsInSource200Response * @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 UpdateSchemaSettingsInSource200Response updateSchemaSettingsInSource(String sourceId, UpdateSchemaSettingsInSourceV1Input updateSchemaSettingsInSourceV1Input) throws ApiException { ApiResponse localVarResp = updateSchemaSettingsInSourceWithHttpInfo(sourceId, updateSchemaSettingsInSourceV1Input); return localVarResp.getData(); } /** * Update Schema Settings in Source * Updates the schema configuration for a Source. If Protocols is not enabled for the Source, any updates to Protocols-specific configurations will not be applied. Config API omitted fields: - `updateMask` * @param sourceId (required) * @param updateSchemaSettingsInSourceV1Input (required) * @return ApiResponse<UpdateSchemaSettingsInSource200Response> * @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 updateSchemaSettingsInSourceWithHttpInfo(String sourceId, UpdateSchemaSettingsInSourceV1Input updateSchemaSettingsInSourceV1Input) throws ApiException { okhttp3.Call localVarCall = updateSchemaSettingsInSourceValidateBeforeCall(sourceId, updateSchemaSettingsInSourceV1Input, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update Schema Settings in Source (asynchronously) * Updates the schema configuration for a Source. If Protocols is not enabled for the Source, any updates to Protocols-specific configurations will not be applied. Config API omitted fields: - `updateMask` * @param sourceId (required) * @param updateSchemaSettingsInSourceV1Input (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 updateSchemaSettingsInSourceAsync(String sourceId, UpdateSchemaSettingsInSourceV1Input updateSchemaSettingsInSourceV1Input, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateSchemaSettingsInSourceValidateBeforeCall(sourceId, updateSchemaSettingsInSourceV1Input, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateSource * @param sourceId (required) * @param updateSourceAlphaInput (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 updateSourceCall(String sourceId, UpdateSourceAlphaInput updateSourceAlphaInput, 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 = updateSourceAlphaInput; // create path and map variables String localVarPath = "/sources/{sourceId}" .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 = { "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 updateSourceValidateBeforeCall(String sourceId, UpdateSourceAlphaInput updateSourceAlphaInput, final ApiCallback _callback) throws ApiException { // verify the required parameter 'sourceId' is set if (sourceId == null) { throw new ApiException("Missing the required parameter 'sourceId' when calling updateSource(Async)"); } // verify the required parameter 'updateSourceAlphaInput' is set if (updateSourceAlphaInput == null) { throw new ApiException("Missing the required parameter 'updateSourceAlphaInput' when calling updateSource(Async)"); } okhttp3.Call localVarCall = updateSourceCall(sourceId, updateSourceAlphaInput, _callback); return localVarCall; } /** * Update Source * Updates an existing Source. When called, this endpoint may generate one or more of the following [Audit Trail](/tag/Audit-Trail) events: * Source Modified * Source Enabled * Source Settings Modified * Source Disabled Config API omitted fields: - `updateMask` * @param sourceId (required) * @param updateSourceAlphaInput (required) * @return UpdateSource200Response * @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 UpdateSource200Response updateSource(String sourceId, UpdateSourceAlphaInput updateSourceAlphaInput) throws ApiException { ApiResponse localVarResp = updateSourceWithHttpInfo(sourceId, updateSourceAlphaInput); return localVarResp.getData(); } /** * Update Source * Updates an existing Source. When called, this endpoint may generate one or more of the following [Audit Trail](/tag/Audit-Trail) events: * Source Modified * Source Enabled * Source Settings Modified * Source Disabled Config API omitted fields: - `updateMask` * @param sourceId (required) * @param updateSourceAlphaInput (required) * @return ApiResponse<UpdateSource200Response> * @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 updateSourceWithHttpInfo(String sourceId, UpdateSourceAlphaInput updateSourceAlphaInput) throws ApiException { okhttp3.Call localVarCall = updateSourceValidateBeforeCall(sourceId, updateSourceAlphaInput, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update Source (asynchronously) * Updates an existing Source. When called, this endpoint may generate one or more of the following [Audit Trail](/tag/Audit-Trail) events: * Source Modified * Source Enabled * Source Settings Modified * Source Disabled Config API omitted fields: - `updateMask` * @param sourceId (required) * @param updateSourceAlphaInput (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 updateSourceAsync(String sourceId, UpdateSourceAlphaInput updateSourceAlphaInput, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateSourceValidateBeforeCall(sourceId, updateSourceAlphaInput, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy